关于novikoff定理成立的条件(感知机的收敛性)

读李航的《统计学习方法》时,读到了novikoff定理,内容如下:

我马上感到困惑,k怎么与学习率无关呢?难道学习率再小也能保证在此上界次数内学完?

研究公式发现,更新k次后得到超平面方程为

(\eta \sum y_{i}\hat{x}_{i}+\hat{w_{0}})\hat{x}=0

其中求和项内是每次(共k次)用来更新权重的误分类实例。

显然,如果\hat{w_{0}}=0,则\eta可约去,此方程与学习率\eta无关,那么总学习次数与\eta也无关;

如果\hat{w_{0}}\neq0,则此方程与\hat{w_{0}}\eta都有关,总学习次数与\hat{w_{0}}\eta也都有关,这时公式(2.9)就未必成立了。那么究竟它还成不成立呢,让我们做个实验。

实验

假设训练数据集的正实例点是(3,3), (4,3),负实例点是(1,1).

那么\hat{w}_{opt}=[\frac{1}{\sqrt{11}},\frac{1}{\sqrt{11}},\frac{-3}{\sqrt{11}},]满足条件\left \| \hat{w}_{opt} \right \|=1且使超平面\hat{w}_{opt}\cdot \hat{x}=0将训练数据集正确分开,于是可求得\gamma \leqslant \frac{1}{\sqrt{11}},取\gamma =\frac{1}{\sqrt{11}}

又,易求得R=\sqrt{26},于是k\leqslant (\frac{R}{\gamma })^{2}=286.

设定\hat{w_{0}}=0,改变学习率,发现学习次数不变:

trainX = np.array([[3,3],[4,3],[1,1]], dtype=np.float64)
trainY = [1,1,-1]
for i in range(6):
    lr = 0.1**i
    w = np.array([0,0], dtype=np.float64)
    b = 0
    sign = True
    cnt = 0
    while sign:
        sign = False
        for x,y in zip(trainX, trainY):
            if y*(np.dot(w,x) + b) <= 0:
                w += lr*y*x
                b += lr*y
                cnt += 1
                sign = True
                break
    print(cnt)

’‘’运行结果:
7
7
7
7
7
7
‘’‘

 

设定\hat{w_{0}}\neq0,改变学习率,发现学习次数变化,且可能大于286:

trainX = np.array([[3,3],[4,3],[1,1]], dtype=np.float64)
trainY = [1,1,-1]
for i in range(6):
    lr = 0.1**i
    w = np.array([1.8,-0.5], dtype=np.float64)
    b = 0.01
    sign = True
    cnt = 0
    while sign:
        sign = False
        for x,y in zip(trainX, trainY):
            if y*(np.dot(w,x) + b) <= 0:
                w += lr*y*x
                b += lr*y
                cnt += 1
                sign = True
                break
    print(cnt)

’‘’运行结果:
4
5
44
437
4367
43667
‘’‘

结论

novikoff定理成立的条件是算法从\hat{w_{0}}=0开始,否则不等式k\leqslant (\frac{R}{\gamma })^{2}不成立。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
iPhone User Interface Design Projects,英文版本,大小 36 Mb,作者:Keith Peters、Joachim Bondo、David Barnard、Craig Kemper、Eddie Wilson、Dan Burcaw、Tim Novikoff、Chris Parrish、Jurgen Siebert,2009 年 11 月出版。 Whatever type of iPhone project you have in mind—social networking app, game, or reference tool—you’ll benefit from the information presented in this book. More than just tips and pointers, you’ll learn from the authors’ hands-on experiences, including: Dave Barnard of App Cubby on how to use Apple’s User Interface conventions and test for usability to assure better results Joachim Bondo, creator of Deep Green Chess, beats a classic design problem of navigating large dataset results in the realm of the iPhone Former Apple employee Dan Burcaw tailors user interfaces and adds the power of CoreLocation, Address Book, and Camera to the social networking app, Brightkite David Kaneda takes his Basecamp project management client, Outpost, from a blank page (literally) to a model of dashboard clarity Craig Kemper focuses on the smallest details to create his award-winning puzzle games TanZen and Zentomino Tim Novikoff, a graduate student in applied math with no programming experience, reduces a complex problem to simplicity in Flash of Genius: SAT Vocab Long-time Mac developer Chris Parrish goes into detail on the creation of the digital postcard app, Postage, which won the 2009 Apple Design Award Flash developer Keith Peters provides solutions for bringing games that were designed for a desktop screen to the small, touch-sensitive world of the iPhone Jürgen Siebert, creator of FontShuffle, outlines the anatomy of letters and how to select the right fonts for maximum readability on the iPhone screen Eddie Wilson, an interactive designer, reveals the fine balance of excellent design and trial-by-fire programming used to create his successful app Snow Report Combined with Apress’ best-selling Beginning iPhone 3 Development: Exploring the iPhone SDK, you’ll be prepared to match great code with striking design and create the app that everyone is talking about. What you’ll learn Optimize your design for the iPhone’s limited screen real estate and the mobile environment Create a user interface that is eye-catching and stands apart from the crowd Maximize your use of typographic elements for style and readability Perfect entry views and display large amounts of data in an exciting way Translate games made for the desktop’s big screen to the iPhone Strike the perfect balance between simplicity, beauty, and features Who is this book for? iPhone application developers of all experience levels and development platforms

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值