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

Class LinearRegressionModelBase

source code

 object --+    
          |    
LinearModel --+
              |
             LinearRegressionModelBase

A linear regression model.

>>> lrmb = LinearRegressionModelBase(array([1.0, 2.0]), 0.1)
>>> abs(lrmb.predict(array([-1.03, 7.777])) - 14.624) < 1e-6
True
Instance Methods
 
predict(self, x)
Predict the value of the dependent variable given a vector x
source code

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__