You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiangrui Meng (JIRA)" <ji...@apache.org> on 2014/11/12 22:57:34 UTC
[jira] [Resolved] (SPARK-4369) TreeModel.predict does not work with
RDD
[ https://issues.apache.org/jira/browse/SPARK-4369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Xiangrui Meng resolved SPARK-4369.
----------------------------------
Resolution: Fixed
Fix Version/s: 1.2.0
Issue resolved by pull request 3230
[https://github.com/apache/spark/pull/3230]
> TreeModel.predict does not work with RDD
> ----------------------------------------
>
> Key: SPARK-4369
> URL: https://issues.apache.org/jira/browse/SPARK-4369
> Project: Spark
> Issue Type: Bug
> Components: MLlib, PySpark
> Affects Versions: 1.2.0
> Reporter: Davies Liu
> Priority: Blocker
> Fix For: 1.2.0
>
>
> {code}
> Stack Trace
> -------------
> Traceback (most recent call last):
> File "/home/rprabhu/Coding/github/SDNDDoS/classification/DecisionTree.py",
> line 49, in <module>
> predictions = model.predict(parsedData.map(lambda x: x.features))
> File "/home/rprabhu/Software/spark/python/pyspark/mllib/tree.py", line 42,
> in predict
> return self.call("predict", x.map(_convert_to_vector))
> File "/home/rprabhu/Software/spark/python/pyspark/mllib/common.py", line
> 140, in call
> return callJavaFunc(self._sc, getattr(self._java_model, name), *a)
> File "/home/rprabhu/Software/spark/python/pyspark/mllib/common.py", line
> 117, in callJavaFunc
> return _java2py(sc, func(*args))
> File
> "/home/rprabhu/Software/spark/python/lib/py4j-0.8.2.1-src.zip/py4j/java_gateway.py",
> line 538, in __call__
> File
> "/home/rprabhu/Software/spark/python/lib/py4j-0.8.2.1-src.zip/py4j/protocol.py",
> line 304, in get_return_value
> py4j.protocol.Py4JError: An error occurred while calling o39.predict. Trace:
> py4j.Py4JException: Method predict([class
> org.apache.spark.api.java.JavaRDD]) does not exist
> at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:333)
> at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:342)
> at py4j.Gateway.invoke(Gateway.java:252)
> at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
> at py4j.commands.CallCommand.execute(CallCommand.java:79)
> at py4j.GatewayConnection.run(GatewayConnection.java:207)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org