pyspark.mllib.regression.
LassoWithSGD
Train a regression model with L1-regularization using Stochastic Gradient Descent.
New in version 0.9.0.
Deprecated since version 2.0.0: Use pyspark.ml.regression.LinearRegression with elasticNetParam = 1.0. Note the default regParam is 0.01 for LassoWithSGD, but is 0.0 for LinearRegression.
pyspark.ml.regression.LinearRegression
Methods
train(data[, iterations, step, regParam, …])
train
Methods Documentation
Train a regression model with L1-regularization using Stochastic Gradient Descent. This solves the l1-regularized least squares regression formulation
f(weights) = 1/(2n) ||A weights - y||^2 + regParam ||weights||_1
Here the data matrix has n rows, and the input RDD holds the set of rows of A, each with its corresponding right hand side label y. See also the documentation for the precise formulation.
pyspark.RDD
The training data, an RDD of 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)
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)