2012-01-19から1日間の記事一覧

第1回:P1-10まで

PRMLを読み始めた。 ということで最初の方の図をトレース。 ggplot脳なのでggplotでやる。 library(ggplot2) x <- seq(0, 1, by=0.1) t <- sin(2*pi*x) + rnorm(n=11, mean=0, sd=0.5) M0 <- fitted(lm(t~1)) M1 <- fitted(lm(t~poly(x,1))) M3 <- fitted(lm…