-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warm starting error because of empty array in the search space #155
Comments
For the MWE please include relevant import statement and also post it as code snippet, not just stack trace. That makes running it locally easier. The way the hyperparameters are defined means they rely on shared values at the top of the config: "min_samples_split": range(2, 21),
"min_samples_leaf": range(1, 21), which means they don't need to be prefixed with the classifier: Individual.from_string("ExtraTreesClassifier(SelectFwe(StandardScaler(data), SelectFwe.score_func=f_classif, SelectFwe.alpha=0.035), ExtraTreesClassifier.bootstrap=False, ExtraTreesClassifier.max_features=0.45, ExtraTreesClassifier.n_estimators=100, ExtraTreesClassifier.criterion='entropy',
-ExtraTreesClassifier.min_samples_split=6
+min_samples_split=6, min_samples_leaf=1
)", automl._pset, automl._operator_set._compile) I am not sure why |
Sorry missed the MWE code, here you go: from gama.genetic_programming.components import Individual, PrimitiveNode
from gama import GamaClassifier
automl = GamaClassifier(max_total_time=3000, n_jobs=1)
Individual.from_string("ExtraTreesClassifier(SelectFwe(StandardScaler(data), SelectFwe.score_func=f_classif, SelectFwe.alpha=0.035), ExtraTreesClassifier.bootstrap=False, ExtraTreesClassifier.min_samples_leaf=3, ExtraTreesClassifier.max_features=0.45, ExtraTreesClassifier.n_estimators=100, ExtraTreesClassifier.criterion='entropy', ExtraTreesClassifier.min_samples_split=6)", automl._pset, automl._operator_set._compile) |
Yes, so this should work: from gama.genetic_programming.components import Individual, PrimitiveNode
from gama import GamaClassifier
automl = GamaClassifier(max_total_time=3000, n_jobs=1)
-Individual.from_string("ExtraTreesClassifier(SelectFwe(StandardScaler(data), SelectFwe.score_func=f_classif, SelectFwe.alpha=0.035), ExtraTreesClassifier.bootstrap=False, ExtraTreesClassifier.min_samples_leaf=3, ExtraTreesClassifier.max_features=0.45, ExtraTreesClassifier.n_estimators=100, ExtraTreesClassifier.criterion='entropy', ExtraTreesClassifier.min_samples_split=6)", automl._pset, automl._operator_set._compile)
+Individual.from_string("ExtraTreesClassifier(SelectFwe(StandardScaler(data), SelectFwe.score_func=f_classif, SelectFwe.alpha=0.035), ExtraTreesClassifier.bootstrap=False, min_samples_leaf=3, ExtraTreesClassifier.max_features=0.45, ExtraTreesClassifier.n_estimators=100, ExtraTreesClassifier.criterion='entropy', min_samples_split=6)", automl._pset, automl._operator_set._compile) |
thanks closing this now |
Extratree classifier has
It looks like this is the reason i can't add Individuals with any value for these parameters in GAMA during warm_start(these individuals were discovered by GAMA)
MWE:
The text was updated successfully, but these errors were encountered: