1
$\begingroup$

I am trying to find the variable importance on a credit scoring database. I have categorical inputs as well as numerical inputs. My question is does the random forest algorithm works the same way when I

case (1) : give only categorical variables as inputs

case (2): both categorical and numerical variables as inputs.

By this what I am actually asking is only categorical variables are enough or numerical variables should be included along with categorical variables as inputs to the algorithm...???

Thanks in advance...

$\endgroup$
1
  • $\begingroup$ It isn't clear to me what this is asking. Are you wondering whether it is possible to run random forest when you have only categorical data? Or whether it is possible to include both? Or whether, if you do have both categorical and numerical data, it's advisable to provide only the categorical data, or whether it is better to also include the numerical data? Do you think that your numerical data is relevant to the classification task at hand? $\endgroup$
    – Silverfish
    Commented Jul 29, 2016 at 15:44

1 Answer 1

3
$\begingroup$

You can keep categorical as well as numeric variable together. Just make sure than you dont have any missing values in the dataset. If you are creating a categorical variable from a numeric that there will be information loss. Also do read this for more info.

$\endgroup$
1
  • $\begingroup$ Thank you for the answer. Don't the absence of numerical variables leads to loss of information in calculating the credit score...??? Are categorical variables enough to calculate the score...??? @Chirayu Chamoli $\endgroup$
    – Sudharsan
    Commented May 24, 2016 at 5:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.