Estou com um problema com a função accuracy_score.
from sklearn.svm import LinearSVC
from sklearn.metrics import accuracy_score
modelo = LinearSVC()
modelo.fit(treino_x, treino_y)
previsoes = modelo.predict(teste_x)
accuracy_score(teste_y, previsoes)
o meu código acima está retornando o erro a baixo.
ValueError Traceback (most recent call last)
<ipython-input-56-04eed5cd32e0> in <cell line: 8>()
6 previsoes = modelo.predict(teste_x)
7
----> 8 accuracy_score(teste_y, previsoes)
2 frames
/usr/local/lib/python3.10/dist-packages/sklearn/metrics/_classification.py in _check_targets(y_true, y_pred)
93
94 if len(y_type) > 1:
---> 95 raise ValueError(
96 "Classification metrics can't handle a mix of {0} and {1} targets".format(
97 type_true, type_pred
ValueError: Classification metrics can't handle a mix of multilabel-indicator and binary targets