Skip to content

Instantly share code, notes, and snippets.

@grohith327
Created May 11, 2018 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grohith327/fc7ea5da2edeae75068abf6931339431 to your computer and use it in GitHub Desktop.
Save grohith327/fc7ea5da2edeae75068abf6931339431 to your computer and use it in GitHub Desktop.
from tpot import TPOTClassifier
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
digits = load_digits()
x_train, x_test, y_train, y_test = train_test_split(digits.data,digits.target,train_size=0.75,test_size=0.25)
clf = TPOTClassifier(generations=10, population_size=20, verbosity=2)
clf.fit(x_train,y_train)
print(clf.score(x_test,y_test))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment