課程
/后端開發(fā)
/Python
/機器學習-實現(xiàn)簡單神經(jīng)網(wǎng)絡(luò)
AttributeError: 'Perceptron' object has no attribute 'predict' 這個問題是怎么解決的,有知道的么?
2017-07-01
源自:機器學習-實現(xiàn)簡單神經(jīng)網(wǎng)絡(luò) 3-4
正在回答
將net_input 和?predict 方法 放到 fit方法外面
Cone_on
Promise_Lee 回復 Cone_on
慕的地591 回復 Promise_Lee
songsst 回復 Promise_Lee
已解決
ppn = Perceptron(eta=0.1,n_iter=10)
ppn.fit(X,y)
print('Totalnumberofmisclassifications:%dof100'%(y!=ppn.predict(X)))
plt.plot(range(1,len(ppn.errors_) + 1),ppn.errors_,marker='o')
plt.xlabel('Epochs')
plt.ylabel('錯誤分類次數(shù)')
在這段代碼里面加一段加粗地方的代碼
songsst 回復 Cone_on
舉報
人工智能時代,你準備好成為抓住機遇的那百分之二嗎。
1 回答'Perceptron' object has no attribute 'predict'
2 回答AttributeError: 'Perceptron' object has no attribute 'predict'
2 回答我同樣的問題,報錯“”Perceptron object has no attribute predict“,如何解決?。考奔奔?/p>
1 回答'numpy' has no attribute 'predict'
3 回答總是顯示錯誤:AttributeError: 'Perception' object has no attribute 'predict'
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學習伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2017-07-18
將net_input 和?predict 方法 放到 fit方法外面
2017-07-01
已解決
ppn = Perceptron(eta=0.1,n_iter=10)
ppn.fit(X,y)
print('Totalnumberofmisclassifications:%dof100'%(y!=ppn.predict(X)))
plt.plot(range(1,len(ppn.errors_) + 1),ppn.errors_,marker='o')
plt.xlabel('Epochs')
plt.ylabel('錯誤分類次數(shù)')
在這段代碼里面加一段加粗地方的代碼