Dear Yang Li, > Neither the classificationTree nor the regressionTree supports categorical feature. That means the Decision trees model can only accept continuous feature.
Consider either manually encoding your categories in bitstrings (e.g., "Facebook" = 001, "Twitter" = 010, "Google" = 100), or using OneHotEncoder to do the same thing for you automatically. Cheers, J.B.
_______________________________________________ scikit-learn mailing list scikit-learn@python.org https://mail.python.org/mailman/listinfo/scikit-learn