GridSearchCV verbose not working with Spyder

33 Views Asked by At

I use Spyder for my machine learning trainings and I use GridSearchCV for hyperparameters optimization. Verbose is not working as it should on Spyder.

When setting njobs to anything greater than 1 with verbose=3, it will retain everything but prompt me everything at the end of the training. When setting njobs to 1, it prints in the IPython console as the training progresses but there is no information of the number of the experiment. It prints something under the following form:

[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.05, pca__n_components=3;, score=0.012 total time=  37.5s
[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.05, pca__n_components=5;, score=0.014 total time= 5.4min
[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.05, pca__n_components=7;, score=0.018 total time= 1.7min
[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.1, pca__n_components=3;, score=0.017 total time= 7.4min
[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.1, pca__n_components=5;, score=0.023 total time= 8.0min
[CV 1/1] END estimator__degree=3, estimator__gamma=auto, estimator__kernel=linear, estimator__max_iter=-1, estimator__nu=0.1, pca__n_components=7;, score=0.014 total time= 6.6min

In this case I run a 1-fold cross validation. But I would expect something indicating the number of the experiment on the total number of experiments to run, to know where I'm at.

Are these problems specific to Spyder? I have seen various threads on this topic but most of them are on Jupyter.

Many thanks in advance.

Antoine

0

There are 0 best solutions below