diff options
author | Joseph K. Bradley <joseph@databricks.com> | 2015-02-25 16:13:17 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-02-25 16:13:17 -0800 |
commit | d20559b157743981b9c09e286f2aaff8cbefab59 (patch) | |
tree | 6d92015c1ae6b05c725860685351f86b8c4ed6af /python/pyspark/mllib/regression.py | |
parent | 46a044a36a2aff1306f7f677e952ce253ddbefac (diff) | |
download | spark-d20559b157743981b9c09e286f2aaff8cbefab59.tar.gz spark-d20559b157743981b9c09e286f2aaff8cbefab59.tar.bz2 spark-d20559b157743981b9c09e286f2aaff8cbefab59.zip |
[SPARK-5974] [SPARK-5980] [mllib] [python] [docs] Update ML guide with save/load, Python GBT
* Add GradientBoostedTrees Python examples to ML guide
* I ran these in the pyspark shell, and they worked.
* Add save/load to examples in ML guide
* Added note to python docs about predict,transform not working within RDD actions,transformations in some cases (See SPARK-5981)
CC: mengxr
Author: Joseph K. Bradley <joseph@databricks.com>
Closes #4750 from jkbradley/SPARK-5974 and squashes the following commits:
c410e38 [Joseph K. Bradley] Added note to LabeledPoint about attributes
bcae18b [Joseph K. Bradley] Added import of models for save/load examples in ml guide. Fixed line length for tree.py, feature.py (but not other ML Pyspark files yet).
6d81c3e [Joseph K. Bradley] completed python GBT examples
9903309 [Joseph K. Bradley] Added note to python docs about predict,transform not working within RDD actions,transformations in some cases
c7dfad8 [Joseph K. Bradley] Added model save/load to ML guide. Added GBT examples to ML guide
Diffstat (limited to 'python/pyspark/mllib/regression.py')
-rw-r--r-- | python/pyspark/mllib/regression.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/pyspark/mllib/regression.py b/python/pyspark/mllib/regression.py index 21751cc68f..66617abb85 100644 --- a/python/pyspark/mllib/regression.py +++ b/python/pyspark/mllib/regression.py @@ -31,8 +31,11 @@ class LabeledPoint(object): The features and labels of a data point. :param label: Label for this data point. - :param features: Vector of features for this point (NumPy array, list, - pyspark.mllib.linalg.SparseVector, or scipy.sparse column matrix) + :param features: Vector of features for this point (NumPy array, + list, pyspark.mllib.linalg.SparseVector, or scipy.sparse + column matrix) + + Note: 'label' and 'features' are accessible as class attributes. """ def __init__(self, label, features): |