pyspark.mllib.classification.
SVMWithSGD
Train a Support Vector Machine (SVM) using Stochastic Gradient Descent.
New in version 0.9.0.
Methods
train(data[, iterations, step, regParam, …])
train
Train a support vector machine on the given data.
Methods Documentation
pyspark.RDD
The training data, an RDD of pyspark.mllib.regression.LabeledPoint.
pyspark.mllib.regression.LabeledPoint
The number of iterations. (default: 100)
The step parameter used in SGD. (default: 1.0)
The regularizer parameter. (default: 0.01)
Fraction of data to be used for each SGD iteration. (default: 1.0)
pyspark.mllib.linalg.Vector
The initial weights. (default: None)
The type of regularizer used for training our model. Allowed values:
“l1” for using L1 regularization
“l2” for using L2 regularization (default)
None for no regularization
Boolean parameter which indicates the use or not of the augmented representation for training data (i.e. whether bias features are activated or not). (default: False)
Boolean parameter which indicates if the algorithm should validate data before training. (default: True)
A condition which decides iteration termination. (default: 0.001)