0

I'm facing an issue with scikit-learn version 1.0.2:

model = OneVsRestClassifier(RandomForestClassifier())

parameters = {'estimator__n_estimators': [50, 100, 200],
              'estimator__criterion': ['gini', 'entropy'], 
              'estimator__max_depth': range(10, 25), 
              'estimator__min_samples_split': [2, 5, 8], 
              'estimator__max_features': ['sqrt'], 
              'estimator__min_samples_leaf': [1, 2, 5, 8],
              'estimator__class_weight': ['balanced']}

model_tunning = GridSearchCV(model, 
                             param_grid=parameters,
                             scoring='precision_micro',
                             n_jobs = 8, 
                             verbose = 10)

model_tunning.fit(X_train, y_train)

For some reason no progress happening after significant amount of time. In comparison with version 0.20.3 it shows more fits. I also checked syntax with shift+tab in order to see if there is a difference.

I also updated numpy to 1.21.1 and mock to 4.0.3. I there any other versions of different packages needed?

Egorsky
  • 179
  • 1
  • 11
  • I tried your code with the `iris` dataset and it seems to work fine - in `ipython` verbose progress messages started screaming out immediately and continuously. Maybe there is something "off" about your current environment? If you create a new `venv` and try again, does it work? – rickhg12hs Feb 23 '22 at 00:12
  • @rickhg12hs I tried with an ordinary classifier and iris dataset. It still shows amount of fits but I don't see any progress and its' status. Basically it's just shown post-factum when calculation is completed. Maybe there are changes in "verbose"? Because I do not understand how to display status – Egorsky Feb 28 '22 at 09:24
  • I used the most recent packages, except for perhaps `numpy` since I use `numba` (my `numpy` is only slightly behind though and probably irrelevant). I don't have `mock` and not sure if that's significant. Are you using the most recent packages? When I ran your code with the `iris` dataset, several status messages were printed per second and there were more than a thousand of them. Eventually it completed normally and the results looked reasonable. Did you try from a new `venv`? ... and from `ipython`? – rickhg12hs Feb 28 '22 at 12:56

0 Answers0