Created
August 14, 2018 23:01
-
-
Save FavioVazquez/3786580b03e16c16848d8939b3aeaae5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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_digits | |
from sklearn.model_selection import train_test_split | |
# load and split dataset | |
digitsdigits == load_digitsload_di () | |
X_train, X_test, y_train, y_test = train_test_split(digits.data, digits.target, | |
train_size=0.75, test_size=0.25) | |
# Fit the TPOT classifier | |
tpot = TPOTClassifier(verbosity=2, max_time_mins=5, population_size=40) | |
tpot.fit(X_train, y_train) | |
# Export pipeline | |
tpot.export('tpot_mnist_pipeline.py') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment