pythonargumentsscikit-learnverbosityverbose

'verbose' argument in scikit-learn


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?


Solution

  • 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.