[Rライブラリ探索]Rライブラリの探索2(機械学習)
使えそうなライブラリ:earth, gbm, CoxBoost, e1071, kernlab
R task viewのライブラリを片っ端から実行してみる修行第二弾(第一弾は最初の記事です)。
task viewは次のサイトにある。
http://cran.r-project.org/web/views/
持ってる健診データに対して実用性の高いMachine Larningのグループからやっています。
今日やった中でめぼしかったのは次のライブラリ。
- earth:FriedmanのMARS(Multivariate Adaptive Regression Spline)を実行(http://www.salfordsystems.com/doc/MARS.pdf)
- gbm:Generalized Boosted Regression
- CoxBoost:競合リスクをBoostingで推定できる(らしい)
- e1071, kernlab:様々な予測方法
Rコードは↓
library(earth) #Multivariate Adaptive Regression Spline example(earth) #Friedman’s papers "Multivariate Adaptive Regression Splines" and "Fast MARS" example(evimp) #earthで作られたモデルでの変数の重要度を表示する example(plot.earth) example(plot.earth.models) example(plotd) example(plotmo) #予測モデルの3次元表示(2変数と結果変数のグラフ、他の変数は固定) #Friedmanの論文↓ #http://www.salfordsystems.com/doc/MARS.pdf #http://www.milbo.users.sonic.net/earth/Friedman-FastMars.pdf #http://www-stat.stanford.edu/research/index.html library(penalizedSVM) #SVMによる変数選択(遺伝子の分野で提案) example(lpsvm) library(gbm) #Generalized Boosted Regression Models example(quantile.rug) #quantile regression example(calibrate.plot) example(gbm) #様々なsummary library(GAMBoost) #Generalized linear and additive models by likelihood based boosting example(GLMBoost) example(plot.GAMBoost) library(CoxBoost) #Cox models by likelihood based boosting for a single survival endpoint or competing risks example(CoxBoost) example(predict.CoxBoost) library(e1071) #様々なモデルの寄せ集め example(naiveBayes) example(plot.svm) example(predict.svm) example(svm) example(bclust) #Bagged Clustering(k-means法をbootstrapで繰り返して統合する) example(cmeans) #Fuzzy c-means clustering example(cshell) #c-shell clustering (prototype of fuzzy kmeans) example(lca) #latent class analysis example(permutations) #ベクトルを並べ替える example(rbridge) example(rwiener) #確率過程? example(probplot) #確率プロット example(impute) #補間 example(matchControls) #マッチング example(sigmoid) example(plot.tune) example(tune) #grid search example(bootstrap.lca) example(countpattern) #バイナリパターンのカウント #ica #独立成分分析 example(skewness) example(moment) example(kurtosis) example(bincombinations) #バイナリパターンの作成 library(kernlab) #Kernel Machine Learning example(csi) #コレスキー分解 example(inchol) #不完全コレスキー分解 example(kernelMatrix) #カーネル行列 example(ksvm) #Kernel SVM example(lssvm) #Least Squares SVM example(ranking) #データ重要度のランキング example(kfa) #Kernel Feature Analysis example(kpca) #Kernel PCA example(kha) #Kernel Hidden Analysis example(kkmeans) #Kernel k-means example(specc) #Spectral Clustering example(kqr) #Kernel Quantile Regression example(kmmd) #Kernel Maximum Mean Discrepancy(ノンパラの一致度検定?)