Hi I am trying to train a Random Forest over my dataset. I have a binary classification problem. When I call the train method as below
model = RandomForest.trainClassifier(data, numClasses=2, categoricalFeaturesInfo={},numTrees=3, featureSubsetStrategy="auto", impurity='gini maxDepth=4, maxBins=32) I get the error 15/07/15 16:24:28 ERROR Executor: Exception in task 1.0 in stage 95.0 (TID 145) java.lang.IllegalArgumentException: GiniAggregator given label 2.0 but requires label < numClasses (= 2). What argument am I missing or not specifying correctly. Thanks Rishi -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Random-Forest-Error-tp23847.html Sent from the Apache Spark User List mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org