Created
April 5, 2018 21:52
-
-
Save sergiolucero/ee85de75ff1b2a24881facce7994faff to your computer and use it in GitHub Desktop.
Boston Teapot Party!
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 TPOTRegressor | |
| from sklearn.datasets import load_boston | |
| from sklearn.model_selection import train_test_split | |
| housing = load_boston() | |
| X_train, X_test, y_train, y_test = train_test_split(housing.data, housing.target, | |
| train_size=0.75, test_size=0.25) | |
| tpot = TPOTRegressor(generations=5, population_size=50, verbosity=2) | |
| tpot.fit(X_train, y_train) | |
| print(tpot.score(X_test, y_test)) | |
| tpot.export('tpot_boston_pipeline.py') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment