October 2017
Beginner to intermediate
572 pages
26h 1m
English
In some classification packages, such as rpart, the object generated from the training model contains the variable importance. We can examine the variable importance by accessing the output object:
> library(rpart) > model.rp = rpart(churn~., data=trainset) > model.rp$variable.importance Output total_day_minutes total_day_charge 111.645286 110.881583 number_customer_service_calls total_intl_minutes 58.486651 48.283228 total_intl_charge total_eve_charge 47.698379 47.166646 total_eve_minutes international_plan 47.166646 42.194508 total_intl_calls number_vmail_messages 36.730344 19.884863 voice_mail_plan total_night_calls 19.884863 7.195828 total_eve_calls total_night_charge 3.553423 1.754547 total_night_minutes total_day_calls ...
Read now
Unlock full access