fengdu78 / lihang-code

《统计学习方法》的代码实现
18.66k stars 6.26k forks source link

第2章 感知机 scikit-learn实例 #30

Open junliang230 opened 4 years ago

junliang230 commented 4 years ago

请问为什么clf = Perceptron(fit_intercept=False, max_iter=1000, shuffle=False)这里的fit_intercept要设置为false呢,这样不就没有截距了吗

Yangweb72 commented 3 years ago

应该因为感知器模型产生的超平面一定会经过原点,所以截距为0.