File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
mllib/src/main/scala/org/apache/spark/mllib/classification Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1818package org .apache .spark .mllib .classification
1919
2020import org .apache .spark .annotation .Experimental
21- import org .apache .spark .api .java .{ JavaDoubleRDD , JavaRDD }
21+ import org .apache .spark .api .java .JavaRDD
2222import org .apache .spark .mllib .linalg .Vector
2323import org .apache .spark .rdd .RDD
2424
@@ -48,8 +48,8 @@ trait ClassificationModel extends Serializable {
4848 /**
4949 * Predict values for examples stored in a JavaRDD.
5050 * @param testData JavaRDD representing data points to be predicted
51- * @return a JavaDoubleRDD where each entry contains the corresponding prediction
51+ * @return a JavaRDD[java.lang.Double] where each entry contains the corresponding prediction
5252 */
53- def predict (testData : JavaRDD [Vector ]): JavaDoubleRDD =
54- JavaDoubleRDD .fromRDD( predict(testData.rdd))
53+ def predict (testData : JavaRDD [Vector ]): JavaRDD [java.lang. Double ] =
54+ predict(testData.rdd).toJavaRDD(). asInstanceOf [ JavaRDD [java.lang. Double ]]
5555}
You can’t perform that action at this time.
0 commit comments