Skip to content

Instantly share code, notes, and snippets.

@WillKoehrsen
Created October 18, 2018 00:55
Show Gist options
  • Save WillKoehrsen/b3824897660cf3f3f25ed943ff673f7b to your computer and use it in GitHub Desktop.
Save WillKoehrsen/b3824897660cf3f3f25ed943ff673f7b to your computer and use it in GitHub Desktop.
from tpot import TPOTClassifier
from sklearn.model_selection import TimeSeriesSplit
# Cross validation object
tss = TimeSeriesSplit(n_splits = 3)
# Make the tpot search model
tpot_pipeline = TPOTClassifier(generations = 10, population_size = 10,
cv = tss, scoring = 'f1')
# Find best model
tpot_pipeline.fit(train, train_labels)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment