3
porco1 = [1,1,0]
porco2 = [1,1,0]
porco3 = [1,1,0]
cachorro1 = [1,1,1]
cachorro2 = [0,1,1]
cachorro3 = [0,1,1]
dados = [porco1, porco2, porco3, cachorro1, cachorro2, cachorro3]
marcacoes = [1, 1, 1, -1, -1, -1]
misterioso = [1, 1, 1]
from sklearn.naive_bayes import MultinomialNB
modelo = MultinomialNB()
modelo.fit(dados, marcacoes)
print(ntmodelo.predict(misterioso))
I am trying to run this code in Python, but always appears this error. Can anyone help me please
From the message, it looks like the library
numpy
is not installed. Try running the commandpython -m pip install numpy
orpip install numpy
– Gomiero
Instead of posting a photo of the error make the selection and copy and paste here, pictures of codes and errors are not always useful
– Guilherme Nascimento