01 11 2009 Python machinelearning Tweet
Machine Learning 4章
Machine Learning: An Algorithmic Perspective (Chapman & Hall/Crc Machine Learning & Patrtern Recognition)
Stephen Marsland
Chapman & Hall / ¥ 6,459 ()
通常1~3週間以内に発送
Stephen Marsland
Chapman & Hall / ¥ 6,459 ()
通常1~3週間以内に発送
- k-meansで初期値決め
- train
- パーセプトロンの学習アルゴリズムと大体一緒
scipyにはB-splinesが用意されているのでそれを使ってみる
from pylab import *
from numpy import *
from scipy.signal import cspline1d, cspline1d_eval
x = arange(-3,10,0.05)
y = 2.5 * exp(-(x)**2/9) + 3.2 * exp(-(x-0.5)**2/4) + random.normal(0.0, 1.0, len(x))
spline = cspline1d(y,100)
xbar = arange(-5,15,0.1)
ybar = cspline1d_eval(spline, xbar, dx=x[1]-x[0], x0=x[0])
plot(x,y,'.')
plot(xbar,ybar)