Closed sumanthratna closed 4 years ago
BTW @sumanthratna does this happen if you swap out with RandomizedSearchCV?
Hi @sumanthratna, we don't currently support multimetric scoring, but we're looking into adding this functionality! For now, this should work if you just put one scorer.
BTW @sumanthratna does this happen if you swap out with RandomizedSearchCV?
No, there's no error.
from sklearn.model_selection import RandomizedSearchCV
from sklearn.ensemble import RandomForestClassifier
from sklearn import datasets
from sklearn.model_selection import train_test_split
from scipy.stats import randint
import numpy as np
digits = datasets.load_digits()
x = digits.data
y = digits.target
clf = RandomForestClassifier(random_state=317, verbose=100)
param_distributions = {
"n_estimators": (1, 120),
}
mysearch = RandomizedSearchCV(
clf,
param_distributions,
scoring=(
'homogeneity_score',
'completeness_score',
),
verbose=2,
refit=False,
)
mysearch.fit(x, y)
Hi @sumanthratna, we don't currently support multimetric scoring, but we're looking into adding this functionality! For now, this should work if you just put one scorer.
It looks like the docstring for the scoring
argument in TuneSearchCV
was copied from that of in RandomizedSearchCV
It might help to remove the reference to multiple metrics. I can open a PR for this if that'd help.
You're more than welcome to open a PR. We'll be happy to take a look :)
Reproducible Example
results in:
Environment