Last active
June 18, 2019 13:43
-
-
Save juliobguedes/192e72565e11bb828a21bfde3b3e943e to your computer and use it in GitHub Desktop.
grid_example.py
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
dtree_parameters = { | |
'max_depth': [12, 24, 36, 50], | |
'min_samples_leaf': [5, 10, 15, 25], | |
'max_features': ['sqrt', 'log2', None], | |
'max_leaf_nodes': [50, 100, 175, 250] | |
} | |
decision_tree_model = DTree() | |
decision_tree = GSearchCV(decision_tree_model, dtree_parameters, cv=5, n_jobs=-1, scoring=acc, verbose = 10) | |
decision_tree.fit(rntr, ry_train) | |
best_tree = decision_tree.best_estimator_ | |
best_tree.fit(rntr, ry_train) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment