-1
from sklearn.svm import LinearSVC
from sklearn.metrics import accuracy_score
# retorna 1 se houver mais de 1 número 1
treino_x = [[1,0,1],[1,1,0],[0,0,1],[0,1,1]]
teste_x =[[1,0,0],[1,0,0],[0,0,1],[1,1,1]]
teste_y = np.array([0,0,0,1])
treino_y = np.array([1,1,0,1])
modelo = LinearSVC()
modelo.fit(treino_x,treino_y)
predict = modelo.predict(teste_x)
accuracy_score(teste_y,teste_x)
I tried to train this model, but retouche:
Valueerror: Classification Metrics can’t Handle a mix of Binary and multilabel-Indicator targets Could someone help me? D
truth! Thank you for helping me, I am a little new in this world, but blood in the eyes and we will fix it there :D
– Allen Rodger