Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down