Package pyspark :: Package mllib :: Module regression :: Class LassoModel
[frames] | no frames]

Class LassoModel

source code

           object --+        
                    |        
          LinearModel --+    
                        |    
LinearRegressionModelBase --+
                            |
                           LassoModel

A linear regression model derived from a least-squares fit with an l_1 penalty term.

>>> data = array([0.0, 0.0, 1.0, 1.0, 3.0, 2.0, 2.0, 3.0]).reshape(4,2)
>>> lrm = LassoWithSGD.train(sc.parallelize(data), initialWeights=array([1.0]))
Instance Methods

Inherited from LinearRegressionModelBase: predict

Inherited from LinearModel: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__