8000 [feature request] change verbosity level of _fit_and_score method · Issue #12958 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content
[feature request] change verbosity level of _fit_and_score method #12958
Closed
@AlJohri

Description

@AlJohri

If I set verbose=2 within RandomizedSearchCV, I ideally want to see the steps that Parallel takes:

[Parallel(n_jobs=-1)]: Done   2 out of  10 | elapsed:   40.9s remaining:  2.7min

but I don't want to see the intermediate reporting of the CV search since that gets super noisy:

[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=8.022557928125194e-06 ..........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.1751658491093436e-05 .........................
[CV] estimator__alpha=1.356430250055455e-06 ..........................
[CV] estimator__alpha=8.022557928125194e-06 ..........................

if we could change verbose > 1 to verbose > 2 this would solve my usecase.

if verbose > 1:
if parameters is None:
msg = ''
else:
msg = '%s' % (', '.join('%s=%s' % (k, v)
for k, v in parameters.items()))
print("[CV] %s %s" % (msg, (64 - len(msg)) * '.'))

I'd be happy to submit a PR if this makes sense.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0