- 博客(2)
- 收藏
- 关注
原创 统计方法学习-李航-第三章-例3.1
本文实现了基于python的框架自动去计算两个数之间的Lp distance x1=(1,1) x2=(5,1) x3=(4,4) x=(x1,x2,x3) # def Lp_instance(p): # i=len(x) # total=0 # for t in range(i): # temp=(abs(x[t]-x1[t]))**p # ...
2020-01-06 15:59:06
137
原创 统计方法学习chapter 2 python3代码实现
书上例题,例2.2,用的基于python的代码实现了感知机算法的对偶形式。 x1=[3,3] import numpy as np x2=[4,3] x3=[1,1] x=[x1,x2,x3] y=[1,1,-1] a=[0,0,0] b=0 matrix=np.zeros(shape=(3,3)) for i in range(3): j=0 for j in range(3):...
2020-01-05 14:23:02
138
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅