What is a good technique to use on data that has many categorical variables with many possible values? For example, let's say you are trying to determine what kind of people are more likely to purchase again from your online store and you have E-mail, Country, Browser. Each variable may have 10+ possible values (e.g. Email: yahoo, gmail, hotmail; Country: USA, Canada, Australia, etc.). Plus you also have continuous variables such as the shoppers age and how much they have spent so far.

I have tried using a logit regression but with so many categorical variables, it gets too big and unwieldy. A multiple regression also has the same problems (too many dummy variables).

A decision tree seems to work best, but it requires turning the continuous variables into categorical variables.

Just wondering what kind of solutions/techniques people have applied to similar situations.

Note: I can use R and other stat software.

  • $\begingroup$ Are you looking for an interpretable model to identify attributes of good customers? Or are you looking for a strictly predictive model? Perhaps something in between. $\endgroup$ – Underminer Jan 19 '15 at 21:32

You can try Random Forest. You can have categorical variables with up to 32 distinct values. It is an ensemble method,a quick and relatively precise way for prediction.

if you are comfortable with R, I recommend using Rattle GUI. You can install it like any other package. In Rattle you can do data mining in a point and click way and get the code afterwards, so you do not have to worry about spending too much time on different packages.

You can try many of the algorithms including Random Forest there.


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.