01112009 life
読んだ
- はてなって1U自作なのか
- Garduino面白そう
- Auduinoも面白そう
3週間ぶりの畑。こんなに間を空けたのははじめて。
小松菜はほうれん草と比べて育ちがはやい

ほうれん草は雑草に埋もれているので、草取りを小一時間。夏の手強い雑草と違ってさくさくむしれるのでまぁラクチン。

その後、近所のホームセンターに行ったら、そらまめとかサヤエンドウ、グリンピースなんかが売ってた。
ソラマメでも植えようかと思ったんだけど、石灰撒いたり肥料撒いたりする時間を考えると結構忙しいスケジュールかも。来年にむけて家庭菜園管理システムでもつくろうかな。
01112009 Python machinelearning
Machine Learning 4章
Machine Learning: An Algorithmic Perspective (Chapman & Hall/Crc Machine Learning & Patrtern Recognition)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)

30102009 DMPK
引き続きThe Art of Modelingという章から。
Validity of the modelとは
からなる。
二番目のCredibilityはユーザーのモデルに対する信念みたいなもの。
29102009 sake
モデルっていうのは仮説をドリブンして、本質に近づくために存在するのであって、正解率をあげるための単なる機械という認識は困るし、仮説ドリブンとか言うといて、その仮説がモチベーションをあげるための単なる虚言で、検証しないことを前提なのも困る。
言葉の定義が揃ってないだけなのかもしれないけど(とか言っておこう)
29102009 DMPK
いきなりThe Art of Modelingという章から入って、いいことたくさん書いてある。
有用なモデルの特性とは
LeadOptimizationのプロジェクトにおいては
の二つが特に重要なんだろうなぁと思う。自分でモデリングできるのであれば、前者だけを重要視するかもしれない。
28102009 music
落ち着いた?それとも薄まった?
危うさというか、アグレッシブというか攻撃的というか斜に構えてるっていうか、そういう鋭さ的なものはあんまないかも。
まぁそんな感じ。嫌いではないけどね。
28102009 Python machinelearning
Machine Learning 3章
Machine Learning: An Algorithmic Perspective (Chapman & Hall/Crc Machine Learning & Patrtern Recognition)要するにbackwars phaseを実装すればいいんでしょ?的な。実際書いてみると逆に誤差を伝播している感がある。
# Code from Chapter 3 of Machine Learning: An Algorithmic Perspective
# by Stephen Marsland (http://seat.massey.ac.nz/personal/s.r.marsland/MLBook.html)
# You are free to use, change, or redistribute the code in any way you wish for
# non-commercial purposes, but please maintain the name of the original author.
# This code comes with no warranty of any kind.
# Stephen Marsland, 2008
# modifiled by kzfm 2009
from numpy import *
inputs = array([[0,0],[0,1],[1,0],[1,1]])
targets = array([[0],[1],[1],[0]])
ndata,nin = shape(inputs)
nout = shape(targets)[1]
nhidden = 2
beta = 1
momentum = 0.9
eta = 0.25
niterations = 10001
weights1 = (random.rand(nin+1,nhidden)-0.5) * 2/sqrt(nin)
weights2 = (random.rand(nhidden+1,nout)-0.5) * 2/sqrt(nhidden)
# train
inputs = concatenate((inputs,-ones((ndata,1))),axis=1)
change = range(ndata)
updatew1 = zeros((shape(weights1)))
updatew2 = zeros((shape(weights2)))
for n in range(niterations):
hidden = concatenate((1.0/(1.0+exp(-beta * dot(inputs,weights1))), -ones((shape(inputs)[0],1))),axis=1)
outputs = 1.0 / (1.0+exp(-beta * dot(hidden,weights2)))
error = 0.5 * sum((targets-outputs)**2)
if (mod(n,1000)==0): print "Iteration: ",n, " Error: ",error
deltao = (targets-outputs) * outputs * (1.0-outputs)
deltah = hidden * (1.0-hidden) * (dot(deltao,transpose(weights2)))
updatew1 = eta*(dot(transpose(inputs),deltah[:,:-1])) + momentum*updatew1
updatew2 = eta*(dot(transpose(hidden),deltao)) + momentum*updatew2
weights1 += updatew1
weights2 += updatew2
random.shuffle(change)
inputs = inputs[change,:]
targets = targets[change,:]
ちなみに、創薬系でのニューラルネットは論文とかは多いけど、実務ではあんまり使われないと思う(特にケミストよりになればなるほど)。というのは、実務においてはゴールするためにはこういうロジックで合成すればよろしいみたいな指針を提示しないといけないが、ニューラルネットでつくったモデルだとそういう解釈がしづらい。
なんか物がたくさんあって、フィルタリングしたいという要求には答えられるけど、何をどういう指針に従って創るかみたいな、創造(製造)律速な問題には使いにくい。
じゃぁ神経系は創造的ではないのかというと、それはまた違うんじゃないかなぁと思ったりもする。モデル化があれなのかなぁとも思うのだけど、、、、
27102009 macbook
新型はまるっこくなって、多少薄くなってた。

skypeとfirefoxとpicasaだけ入れとけばいいのでU隊長(カジュアルユーザー)のための設定は楽。

早速youtubeのピングーをせがむ娘。
iPhoto使うからpicasaはいらんと言われた。