mardi 27 mars 2018

RandomForest Classifier object in arguments

I'm currently working on a random forest classifier, using gridsearch to get the best parameters

So when I get my parameters they are in my var :

params = {'bootstrap': 'True', 'criterion': 'entropy', 'max_depth': 'None', 'max_features': '3', 'min_samples_leaf': '4', 'min_samples_split': '3'}

And I would like to do something like that :

clf = RandomForestClassifier(params)

But here params take the place of n_estimators so I have some errors like :

ValueError: n_estimators must be an integer, got <class 'dict'>.

Any idea on how I could do this ?

Thank you !




Aucun commentaire:

Enregistrer un commentaire