spark-instrumented-optimizer/python/pyspark/mllib
Davies Liu d2e29516f2 [SPARK-4306] [MLlib] Python API for LogisticRegressionWithLBFGS
```
class LogisticRegressionWithLBFGS
 |  train(cls, data, iterations=100, initialWeights=None, corrections=10, tolerance=0.0001, regParam=0.01, intercept=False)
 |      Train a logistic regression model on the given data.
 |
 |      :param data:           The training data, an RDD of LabeledPoint.
 |      :param iterations:     The number of iterations (default: 100).
 |      :param initialWeights: The initial weights (default: None).
 |      :param regParam:       The regularizer parameter (default: 0.01).
 |      :param regType:        The type of regularizer used for training
 |                             our model.
 |                             :Allowed values:
 |                               - "l1" for using L1 regularization
 |                               - "l2" for using L2 regularization
 |                               - None for no regularization
 |                               (default: "l2")
 |      :param intercept:      Boolean parameter which indicates the use
 |                             or not of the augmented representation for
 |                             training data (i.e. whether bias features
 |                             are activated or not).
 |      :param corrections:    The number of corrections used in the LBFGS update (default: 10).
 |      :param tolerance:      The convergence tolerance of iterations for L-BFGS (default: 1e-4).
 |
 |      >>> data = [
 |      ...     LabeledPoint(0.0, [0.0, 1.0]),
 |      ...     LabeledPoint(1.0, [1.0, 0.0]),
 |      ... ]
 |      >>> lrm = LogisticRegressionWithLBFGS.train(sc.parallelize(data))
 |      >>> lrm.predict([1.0, 0.0])
 |      1
 |      >>> lrm.predict([0.0, 1.0])
 |      0
 |      >>> lrm.predict(sc.parallelize([[1.0, 0.0], [0.0, 1.0]])).collect()
 |      [1, 0]
```

Author: Davies Liu <davies@databricks.com>

Closes #3307 from davies/lbfgs and squashes the following commits:

34bd986 [Davies Liu] Merge branch 'master' of http://git-wip-us.apache.org/repos/asf/spark into lbfgs
5a945a6 [Davies Liu] address comments
941061b [Davies Liu] Merge branch 'master' of github.com:apache/spark into lbfgs
03e5543 [Davies Liu] add it to docs
ed2f9a8 [Davies Liu] add regType
76cd1b6 [Davies Liu] reorder arguments
4429a74 [Davies Liu] Update classification.py
9252783 [Davies Liu] python api for LogisticRegressionWithLBFGS
2014-11-18 15:57:33 -08:00
..
__init__.py [SPARK-4348] [PySpark] [MLlib] rename random.py to rand.py 2014-11-13 10:24:54 -08:00
classification.py [SPARK-4306] [MLlib] Python API for LogisticRegressionWithLBFGS 2014-11-18 15:57:33 -08:00
clustering.py [SPARK-4124] [MLlib] [PySpark] simplify serialization in MLlib Python API 2014-10-30 22:25:18 -07:00
common.py [SPARK-3964] [MLlib] [PySpark] add Hypothesis test Python API 2014-11-04 21:35:52 -08:00
feature.py [SPARK-4348] [PySpark] [MLlib] rename random.py to rand.py 2014-11-13 10:24:54 -08:00
linalg.py [SPARK-4348] [PySpark] [MLlib] rename random.py to rand.py 2014-11-13 10:24:54 -08:00
rand.py [SPARK-4348] [PySpark] [MLlib] rename random.py to rand.py 2014-11-13 10:24:54 -08:00
recommendation.py [SPARK-4396] allow lookup by index in Python's Rating 2014-11-18 10:35:29 -08:00
regression.py [SPARK-4372][MLLIB] Make LR and SVM's default parameters consistent in Scala and Python 2014-11-13 13:54:16 -08:00
stat.py [SPARK-4324] [PySpark] [MLlib] support numpy.array for all MLlib API 2014-11-10 22:26:16 -08:00
tests.py [SPARK-3573][MLLIB] Make MLlib's Vector compatible with SQL's SchemaRDD 2014-11-03 22:29:48 -08:00
tree.py [SPARK-4369] [MLLib] fix TreeModel.predict() with RDD 2014-11-12 13:56:41 -08:00
util.py [SPARK-4324] [PySpark] [MLlib] support numpy.array for all MLlib API 2014-11-10 22:26:16 -08:00