diff options
author | Xiangrui Meng <meng@databricks.com> | 2015-05-06 01:28:43 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-05-06 01:28:43 -0700 |
commit | 32cdc815c6fc19b5c8c4eca35f88a61302d67cd5 (patch) | |
tree | 0ed046021a78b1f3682b13ca918d65cd08fed9b9 /python/pyspark/ml/pipeline.py | |
parent | 9f019c7223bb79b8d5cd52980b2723a1601d1134 (diff) | |
download | spark-32cdc815c6fc19b5c8c4eca35f88a61302d67cd5.tar.gz spark-32cdc815c6fc19b5c8c4eca35f88a61302d67cd5.tar.bz2 spark-32cdc815c6fc19b5c8c4eca35f88a61302d67cd5.zip |
[SPARK-6940] [MLLIB] Add CrossValidator to Python ML pipeline API
Since CrossValidator is a meta algorithm, we copy the implementation in Python. jkbradley
Author: Xiangrui Meng <meng@databricks.com>
Closes #5926 from mengxr/SPARK-6940 and squashes the following commits:
6af181f [Xiangrui Meng] add TODOs
8285134 [Xiangrui Meng] update doc
060f7c3 [Xiangrui Meng] update doctest
acac727 [Xiangrui Meng] add keyword args
cdddecd [Xiangrui Meng] add CrossValidator in Python
Diffstat (limited to 'python/pyspark/ml/pipeline.py')
-rw-r--r-- | python/pyspark/ml/pipeline.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/python/pyspark/ml/pipeline.py b/python/pyspark/ml/pipeline.py index 7b875e4b71..c1b2077c98 100644 --- a/python/pyspark/ml/pipeline.py +++ b/python/pyspark/ml/pipeline.py @@ -22,7 +22,7 @@ from pyspark.ml.util import keyword_only from pyspark.mllib.common import inherit_doc -__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel', 'Evaluator'] +__all__ = ['Estimator', 'Transformer', 'Pipeline', 'PipelineModel', 'Evaluator', 'Model'] @inherit_doc @@ -71,6 +71,15 @@ class Transformer(Params): @inherit_doc +class Model(Transformer): + """ + Abstract class for models that are fitted by estimators. + """ + + __metaclass__ = ABCMeta + + +@inherit_doc class Pipeline(Estimator): """ A simple pipeline, which acts as an estimator. A Pipeline consists @@ -154,7 +163,7 @@ class Pipeline(Estimator): @inherit_doc -class PipelineModel(Transformer): +class PipelineModel(Model): """ Represents a compiled pipeline with transformers and fitted models. """ |