You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ValueError:
All the 10 fits failed.
It is very likely that your model is misconfigured.
You can try to debug the error by setting error_score='raise'.
Below are more details about the failures:
--------------------------------------------------------------------------------
10 fits failed with the following error:
File "C:\Users\bscuser\anaconda3\Lib\site-packages\sklearn\svm\_base.py", line 217, in fit
raiseValueError(
ValueError: Precomputed matrix must be a square matrix. Input is a 900x1000 matrix.
It seems that the issue boils to down to not setting properly the pairwise tag for the meta-estimator. So we could solve the issue by including the following in the dictionary returned by _more_tags:
It delegates the pairwise feature to the underlying estimator. I assume we have the same bug for the MultiOutputRegressor and maybe other meta-estimators in this module.
@Alex-Xenos Do you wish to solve this bug and make a pull-request including the fix and the non-regression tests?
glemaitre
changed the title
Cross_validation/cross_val_score does not work with precomputed kernel in Multilabel SVC
MultiOutputClassifier does not rely on estimator to provide pairwise tag
May 16, 2024
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.
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: