1
$\begingroup$

The data set has around 40 variables and 50,000+ rows. Target variable is categorical with 3 levels. I have reduced the number of variables to 31 by removing or combining similar variables. Among these 31 categorical variables, there are some variables which have up to 2000 levels and hence creating dummy variables is not feasible (according to my understanding). Which Machine Algorithm is suited to predict my target variable?

$\endgroup$
1
$\begingroup$

2000 levels is perfectly feasible if your ML supports sparse matrices (ie so you don't run out of memory) (most ml language tasks need that) . Eg in python scikit_learn does this. Then you need to add regularisation (since it is unlikely that all your 2000 levels have sufficient examples) eg in logistic regression 'ridge regression', l2 regularisation.

Ideally you would have a combination or hierarchy of levels: eg rather than an id for each car model/colour combination you would have factors for make/type /fuel/model.

See eg scikit learn tutorial http://scikit-learn.org/stable/auto_examples/text/document_classification_20newsgroups.html

$\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.