This is my Jogging data.
WEATHER JOGGED_YESTERDAY CLASSIFICATION
C N +
W Y -
Y Y -
C Y -
Y N -
W Y -
C N -
W N +
C Y -
W Y +
W N +
C N +
Y N -
W Y -
And I want to make simple decision tree using C5.0
jogging <- read.csv("Jogging.csv")
jogging #training data
library(C50)
set.seed(12345)
jogging_random <- jogging[order(runif(14)), ]
View(jogging_random)
jogging_random$CLASSIFICATION <- ifelse(jogging_random$CLASSIFICATION=="+", 1, 0)
View(jogging_random)
jogging_random$CLASSIFICATION <- as.factor(jogging_random$CLASSIFICATION)
str(jogging_random)
jogging_model <- C5.0(jogging_random[-3], jogging_random$CLASSIFICATION)
plot(jogging_model)
But this is my result.
Class specified by attribute `outcome'
Read 14 cases (3 attributes) from undefined.data
Decision tree:
0 (14/5)
Evaluation on training data (14 cases):
Decision Tree
----------------
Size Errors
1 5(35.7%) <<
(a) (b) <-classified as
---- ----
9 (a): class 0
5 (b): class 1
Time: 0.0 secs
There is no any branches in the model. How can I make proper decision tree using C5.0? I need to use C5.0 instead of other algorithms because I need to use 'information gain'. I need your help.