I know how to specify Feature Selection methods and the list of the Algorithms used in Auto-Sklearn 2.0
JavaScript
x
7
1
mdl = autosklearn.classification.AutoSklearnClassifier(
2
include = {
3
'classifier': ["random_forest", "gaussian_nb", "libsvm_svc", "adaboost"],
4
'feature_preprocessor': ["no_preprocessing"]
5
},
6
exclude=None)
7
I know that Auto-Sklearn use Bayesian Optimisation SMAC
but I would like to specify the HyperParameters in AutoSklearn
For example, I want to specify random_forest with Estimator = 1000
only or MLP with HiddenLayerSize = 100
only.
How to do that?
Advertisement
Answer
You need to edit the config as specified in the docs.
In your case it would be something like:
JavaScript
1
7
1
cs = mdl.get_configuration_space(X, y)
2
config = cs.sample_configuration()
3
config._values['classifier:random_forest:n_estimators'] = 1000
4
pipeline, run_info, run_value = mdl.fit_pipeline(X=X_train, y=y_train,
5
config=config,
6
X_test=X_test, y_test=y_test)
7