# Variables Importance to Predicted Value

I'm working on a model to understand the predictors (variables) importance, and whether going forward I should include them in the model which should scale over > 1M rows. Here is a sample of my data:

type  | div      | predicted
med    standard    win
med    express     loss
high   new         loss
low    standard    win


I've been using R (but I'm open to other tools such as Python), in which I created a model using just "type" for now, and used this command:

library(caret)
modelFit <- train(predicted~., data = train_data, method="rf")
varImp(modelFit)


The output is:

            Overall
divstandard  100
typelow      100
typemed      50


However, I'm looking for what of the variables (either "div" or "type") are more relevant to predicting a "win" or "loss". Ideas on how to find the most important variable in terms of prediction?

I've also looked into using excel with this, in particular the CORREL function, but that doesn't seem to work well with non-numeric variables.

• What function are you using to fit the model? – Sheep Oct 27 '15 at 19:14
• @Sheep - caret package, modelfit function – jKraut Oct 27 '15 at 20:04

I see you are using random forests, so an alternative apporoach would be to try out the C.50 package. It yields a decision tree as well, it is pretty fast, and it gives you a variable improtance summary (which vars were used mostly for splitting the tree).