Created
August 14, 2018 22:56
-
-
Save FavioVazquez/5128d051c180584d12859c7a2fd93baa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tpot import TPOTClassifier | |
from sklearn.datasets import load_iris | |
from sklearn.model_selection import train_test_split | |
# Load iris dataset | |
iris = load_iris() | |
# Split the data | |
X_trainX_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target, | |
train_size=0.75, test_size=0.25) | |
# Fit the TPOT classifier | |
tpot = TPOTClassifier(verbosity=2, max_time_mins=2) | |
tpot.fit(X_train, y_train) | |
# Export the pipeline | |
tpot.export('tpot_iris_pipeline.py') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment