-
-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiOutputClassifier does not rely on estimator to provide pairwise tag #29016
Comments
It seems that the issue boils to down to not setting properly the "pairwise": _safe_tags(self.estimator, key="pairwise"), It delegates the pairwise feature to the underlying estimator. I assume we have the same bug for the @Alex-Xenos Do you wish to solve this bug and make a pull-request including the fix and the non-regression tests? |
Actually, we should probably come with a common test to be sure that all meta-estimators are relying on the underlying estimator to set this tag. |
Please don't provide an LLM suggestion that does not answer to the question. Here we need to work a common test and not just a non-regression specifically for the estimator. |
def _more_tags(self):
tags = {"multioutput_only": True}
if hasattr(self.estimator, "_more_tags"):
estimator_tags = self.estimator._more_tags()
pairwise_tag = estimator_tags.get("pairwise", None)
if pairwise_tag is not None:
tags["pairwise"] = pairwise_tag
return tags Should I implement this and work on common tests or non regression tests ?
|
Describe the bug
I use the
MultiOutputClassifier
function to makeSVC
multilabel.Then, if I use the linear or rbf kernel the cross_validation function works perfectly fine.
However, when I use
SVC
with precomputed kernel is having anValueError: Precomputed matrix must be a square matrix
.Steps/Code to Reproduce
Expected Results
An weighted f1-score.
Actual Results
Versions
The text was updated successfully, but these errors were encountered: