'verbose' argument in scikit-learn

Gyan Veda picture Gyan Veda · May 1, 2015 · Viewed 27.3k times · Source

Many scikit-learn functions have a verbose argument that, according to their documentation, "[c]ontrols the verbosity: the higher, the more messages" (e.g., GridSearchCV).

Unfortunately, no guidance is provided on which integers are allowed (e.g., can a user set verbosity to 100?) and what level of verbosity corresponds to which integers. I cannot find this information anywhere in the documentation.

My question is, which integers map to which levels of verbosity?

Answer

Andreas Mueller picture Andreas Mueller · May 4, 2015

Higher integers map to higher verbosity as the docstring says. You can set verbosity=100 but I'm pretty sure it will be the same as verbosity=10. If you are looking for a list of what exactly is printed for each estimator for each integer, you have to look into the source. I think most estimators only have two or three levels of verbosity, I think 3 or above will be the most verbose you can get.