September 2017
Beginner to intermediate
560 pages
25h 18m
English
The boston-housing-classification.csv file has a MEDV_CAT variable that categorizes the median values into HIGH or LOW, and is suitable for a classification algorithm.
For partitioning the categorical response variable with 70-30 split, use the following commands:
> bh2 <- read.csv("boston-housing-classification.csv") > trg.idx <- createDataPartition(bh2$MEDV_CAT, p=0.7, list = FALSE) > trg.part <- bh2[trg.idx, ] > val.part <- bh2[-trg.idx, ]
Read now
Unlock full access