From 8aa1f4c4f6d60168737699b5a9eafd6a05660976 Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Fri, 18 Apr 2014 10:04:02 -0700 Subject: [PATCH] SPARK-1357 (addendum). More Experimental items in MLlib Per discussion, this is my suggestion to make ALS Rating, ClassificationModel, RegressionModel experimental for now, to reserve the right to possibly change after 1.0. See what you think of this much. Author: Sean Owen Closes #372 from srowen/SPARK-1357Addendum and squashes the following commits: 17cf1ea [Sean Owen] Remove (another) blank line after ":: Experimental ::" 6800e4c [Sean Owen] Remove blank line after ":: Experimental ::" b3a88d2 [Sean Owen] Make ALS Rating, ClassificationModel, RegressionModel experimental for now, to reserve the right to possibly change after 1.0 --- .../spark/mllib/classification/ClassificationModel.scala | 3 +++ .../scala/org/apache/spark/mllib/recommendation/ALS.scala | 2 ++ .../org/apache/spark/mllib/regression/RegressionModel.scala | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/classification/ClassificationModel.scala b/mllib/src/main/scala/org/apache/spark/mllib/classification/ClassificationModel.scala index bd10e2e9e1..6332301e30 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/classification/ClassificationModel.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/classification/ClassificationModel.scala @@ -19,11 +19,14 @@ package org.apache.spark.mllib.classification import org.apache.spark.mllib.linalg.Vector import org.apache.spark.rdd.RDD +import org.apache.spark.annotation.Experimental /** + * :: Experimental :: * Represents a classification model that predicts to which of a set of categories an example * belongs. The categories are represented by double values: 0.0, 1.0, 2.0, etc. */ +@Experimental trait ClassificationModel extends Serializable { /** * Predict values for the given data set using the model trained. diff --git a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala index 5cc47de8ff..102742c7c5 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/recommendation/ALS.scala @@ -56,8 +56,10 @@ private[recommendation] case class InLinkBlock( /** + * :: Experimental :: * A more compact class to represent a rating than Tuple3[Int, Int, Double]. */ +@Experimental case class Rating(val user: Int, val product: Int, val rating: Double) /** diff --git a/mllib/src/main/scala/org/apache/spark/mllib/regression/RegressionModel.scala b/mllib/src/main/scala/org/apache/spark/mllib/regression/RegressionModel.scala index 5e4b8a345b..027305aa78 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/regression/RegressionModel.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/regression/RegressionModel.scala @@ -19,7 +19,12 @@ package org.apache.spark.mllib.regression import org.apache.spark.rdd.RDD import org.apache.spark.mllib.linalg.Vector +import org.apache.spark.annotation.Experimental +/** + * :: Experimental :: + */ +@Experimental trait RegressionModel extends Serializable { /** * Predict values for the given data set using the model trained.