Package pyspark :: Package mllib :: Module classification :: Class LogisticRegressionModel
[frames] | no frames]

Class LogisticRegressionModel

source code

_common.LinearModel --+
                      |
                     LogisticRegressionModel

A linear binary classification model derived from logistic regression.

>>> data = array([0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 1.0, 3.0]).reshape(4,2)
>>> lrm = LogisticRegressionWithSGD.train(sc.parallelize(data))
>>> lrm.predict(array([1.0])) > 0
True
Instance Methods
 
predict(self, x) source code