Drkcore

06 03 2010 Python Tweet

Machine Learning: An Algorithmic Perspective 7章

BoostingとBaggingの章。

AdaBoostのPython実装は参考になった。

でも、AdaBoostはRにあるのは知っているので、そっちを使ってみる。

library(ada)
data(iris)
iris[iris$Species!="setosa",]->iris
n<-dim(iris)[1]
trind<-sample(1:n,floor(.6*n),FALSE)
teind<-setdiff(1:n,trind)
iris[,5]<- as.factor((levels(iris[,5])[2:3])[as.numeric(iris[,5])-1])
gdis<-ada(Species~.,data=iris[trind,],iter=20,nu=1,type="discrete")
gdis=addtest(gdis,iris[teind,-5],iris[teind,5])
plot(gdis,TRUE,TRUE)

adaboost

ProductName Machine Learning: An Algorithmic Perspective (Chapman & Hall/Crc Machine Learning & Patrtern Recognition)
Stephen Marsland
Chapman & Hall / ¥ 6,593 ()
通常2~3週間以内に発送

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021