# features (1 sim, 0 não)
# pelo longo?
# perna curta?
# faz auau?
porco1 = [0, 1, 0]
porco2 = [0, 1, 1]
porco3 = [1, 1, 0]
cachorro1 = [0, 1, 1]
cachorro2 = [1, 0, 1]
cachorro3 = [1, 1, 1]
# 1 => porco, 0 => cachorro
train_x = [porco1, porco2, porco3, cachorro1, cachorro2, cachorro3]
train_y = [1, 1, 1, 0, 0, 0] # labels / etiquetas
from sklearn.svm import LinearSVC
model = LinearSVC()
model.fit(train_x, train_y)
Erro
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-1-68843740ea36> in <module>()
2
3 model = LinearSVC()
----> 4 model.fit(train_x, train_y)
NameError: name 'train_x' is not defined