1
$\begingroup$

I have been playing around with titanic dataset. Here Fare column is a continous variable. I've read people stating that in a classification model it's best to have categorical variables than continous features. So I was wondering if I convert the age into categorical bins will it improve my model accuracy?

$\endgroup$
1
$\begingroup$

There's no concrete property of classifiers in general that lend themselves to using categorical variables rather than continuous variables.

You can definitely try binning the variables, but many classifiers (particularly, tree-based classifiers) will implicitly bin the variables optimally within the algorithm itself.

If you add the continuous variable, and the performance of your classifier doesn't improve, it's very possible that the variable is not predictive of the target or that all of the information (in the information-theory sense) that that variable carries is already expressed by other variables already in the model.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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