LoginSignup
10
11

More than 5 years have passed since last update.

R言語で決定木分析

Last updated at Posted at 2016-03-04

R言語で決定木分析を行うサンプルプログラムを書いたので投稿します。

03_Decision_tree.R
library(rpart)
library(partykit)
library(epitools)

#Read data
data_titanic<-expand.table(Titanic)

#Making decision tree
result<-rpart(Survived~., data = data_titanic)

#Plot result
plot(as.party(result)

結果
03_Output.jpg

10
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11