Re: RandomForestClassifer does not recognize number of classes, nor can number of classes be set

2015-09-30 Thread Yanbo Liang
Hi Kristina, Currently StringIndexer is a requirement step before training DecisionTree, RandomForest and GBT related models. Though it does not necessary by other models such as LogisticRegression and NaiveBayes, it also strongly recommend to make this preprocessing step otherwise it may lead

RandomForestClassifer does not recognize number of classes, nor can number of classes be set

2015-09-29 Thread Kristina Rogale Plazonic
Hi, I'm trying out the ml.classification.RandomForestClassifer() on a simple dataframe and it returns an exception that number of classes has not been set in my dataframe. However, I cannot find a function that would set number of classes, or pass it as an argument anywhere. In mllib, numClasses