fukuball / fuku-ml

Simple machine learning library / 簡單易用的機器學習套件
https://github.com/fukuball/FukuML-Tutorial
MIT License
280 stars 75 forks source link

PLA中檢查data是否線性可分的方法 #34

Closed irexyc closed 6 years ago

irexyc commented 7 years ago

我在網上找的資料說,如果數據線性可分,那麼PLA一定會停止,最大步數為 對於R我們可以從數據集中得到,但是對於gamma,我們無法求得,所以我們只知道存在最大步數,但具體是多少無從得知。

看你的code(PLA.py),似乎是能確定一個上界,可以請問下相關的理論證明麼

if (self.tune_times > (2 * self.data_num)):
      print("Dataset not linear separable.")
      break
fukuball commented 7 years ago

@irexyc 我也不清楚相關的理論證明喔,林軒田教授在課程中也只是說因為資料點不一定是線性可分所以做到「足夠多」步就可以終止,目前程式實作會設這個終止條件也是我自己認為這樣就足夠多次了,而不想讓使用者多去煩惱要多設一個參數,但不確定這樣的門檻值是否是最好的。