老師講的很清楚,雖然數(shù)學(xué)部分,基本忘光光啦
2017-11-13
我來寫個問題匯總吧:
1、初始化函數(shù)錯誤,初始化函數(shù)應(yīng)為:__init__(),前后兩個下劃線
2、函數(shù)調(diào)用錯誤,ppn = Perceptron(0.1,10),這里是調(diào)用函數(shù)
3、self.w_ = np.zero(1+ x.shape[1]),這一句改為self.w_ = np.zeros(1+ x.shape[1]),少個s
1、初始化函數(shù)錯誤,初始化函數(shù)應(yīng)為:__init__(),前后兩個下劃線
2、函數(shù)調(diào)用錯誤,ppn = Perceptron(0.1,10),這里是調(diào)用函數(shù)
3、self.w_ = np.zero(1+ x.shape[1]),這一句改為self.w_ = np.zeros(1+ x.shape[1]),少個s
AttributeError: 'list' object has no attribute 'apppend'
感覺那個橫著的M就像一個for循環(huán),下面是初始化,上面就是for循環(huán)的j < m ; j++ , 然后右邊就是執(zhí)行的代碼:x[j] * w[j]
2017-10-28
AttributeError 'Precetron' object has no attribute 'predict' predict和net_input函數(shù)要獨立fit函數(shù) 如果還有錯,就要考慮代碼的縮進(jìn)是否符合規(guī)范的問題的
np no parameter zero的錯誤是因為新版本python只能用zeros
https://archive.ics.uci.edu/ml/index.php 這里有很多機(jī)器學(xué)習(xí)的數(shù)據(jù)可以拿來練手
2017-10-23