spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Yang <j...@uow.edu.au>
Subject RE: error from DecisonTree Training:
Date Mon, 21 Jul 2014 23:20:54 GMT
So this is a bug unsolved (for java) yet?

From: Jack Yang [mailto:jiey@uow.edu.au]
Sent: Friday, 18 July 2014 4:52 PM
To: user@spark.apache.org
Subject: error from DecisonTree Training:

Hi All,
I got an error while using DecisionTreeModel (my program is written in Java, spark 1.0.1,
scala 2.10.1).
I have read a local file, loaded it as RDD, and then sent to decisionTree for training. See
below for details:

JavaRDD<LabeledPoint> Points = lines.map(new ParsePoint()).cache();
LogisticRegressionModel model = LogisticRegressionWithSGD.train(Points.rdd(),iterations, stepSize);
  // until here it is working
Strategy strategy = new Strategy( ....);
DecisionTree decisionTree = new DecisionTree(strategy);
DecisionTreeModel decisionTreeModel = decisionTree.train(Points.rdd());


The error is : java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.apache.spark.mllib.regression.LabeledPoint;

Any thoughts?

Best regards,
Jack


Mime
View raw message