diff --git a/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala b/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala index cfc7f868a02f..d03cad998337 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/classification/SVM.scala @@ -117,11 +117,19 @@ object SVMModel extends Loader[SVMModel] { } /** + * :: Experimental :: * Train a Support Vector Machine (SVM) using Stochastic Gradient Descent. By default L2 * regularization is used, which can be changed via [[SVMWithSGD.optimizer]]. + * * NOTE: Labels used in SVM should be {0, 1}. + * + * @param stepSize Step size to be used for each iteration of gradient descent. + * @param numIterations Number of iterations of gradient descent to run. + * @param regParam Regularization parameter. + * @param miniBatchFraction Fraction of data to be used per iteration. */ -class SVMWithSGD private ( +@Experimental +class SVMWithSGD ( private var stepSize: Double, private var numIterations: Int, private var regParam: Double, @@ -152,7 +160,6 @@ class SVMWithSGD private ( * Top-level methods for calling SVM. NOTE: Labels used in SVM should be {0, 1}. */ object SVMWithSGD { - /** * Train a SVM model given an RDD of (label, features) pairs. We run a fixed number * of iterations of gradient descent using the specified step size. Each iteration uses diff --git a/mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala b/mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala index 7c66e8cdebdb..31e77d79332e 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/regression/GeneralizedLinearAlgorithm.scala @@ -131,7 +131,7 @@ abstract class GeneralizedLinearAlgorithm[M <: GeneralizedLinearModel] /** * Set if the algorithm should use feature scaling to improve the convergence during optimization. */ - private[mllib] def setFeatureScaling(useFeatureScaling: Boolean): this.type = { + def setFeatureScaling(useFeatureScaling: Boolean): this.type = { this.useFeatureScaling = useFeatureScaling this }