aboutsummaryrefslogtreecommitdiff
path: root/python/pyspark/ml/pipeline.py
diff options
context:
space:
mode:
authorXiangrui Meng <meng@databricks.com>2015-05-21 22:57:33 -0700
committerXiangrui Meng <meng@databricks.com>2015-05-21 22:57:33 -0700
commit8f11c6116bf8c7246682cbb2d6f27bf0f1531c6d (patch)
tree144b7d5b9ec1215e88d05539f51e042a6d39470c /python/pyspark/ml/pipeline.py
parente4136ea6c457bc74cee312aa14974498ab4633eb (diff)
downloadspark-8f11c6116bf8c7246682cbb2d6f27bf0f1531c6d.tar.gz
spark-8f11c6116bf8c7246682cbb2d6f27bf0f1531c6d.tar.bz2
spark-8f11c6116bf8c7246682cbb2d6f27bf0f1531c6d.zip
[SPARK-7535] [.0] [MLLIB] Audit the pipeline APIs for 1.4
Some changes to the pipeilne APIs: 1. Estimator/Transformer/ doesn’t need to extend Params since PipelineStage already does. 1. Move Evaluator to ml.evaluation. 1. Mention larger metric values are better. 1. PipelineModel doc. “compiled” -> “fitted” 1. Hide object PolynomialExpansion. 1. Hide object VectorAssembler. 1. Word2Vec.minCount (and other) -> group param 1. ParamValidators -> DeveloperApi 1. Hide MetadataUtils/SchemaUtils. jkbradley Author: Xiangrui Meng <meng@databricks.com> Closes #6322 from mengxr/SPARK-7535.0 and squashes the following commits: 9e9c7da [Xiangrui Meng] move JavaEvaluator to ml.evaluation as well e179480 [Xiangrui Meng] move Evaluation to ml.evaluation in PySpark 08ef61f [Xiangrui Meng] update pipieline APIs
Diffstat (limited to 'python/pyspark/ml/pipeline.py')
-rw-r--r--python/pyspark/ml/pipeline.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/python/pyspark/ml/pipeline.py b/python/pyspark/ml/pipeline.py
index 0f38e02127..a563024b2c 100644
--- a/python/pyspark/ml/pipeline.py
+++ b/python/pyspark/ml/pipeline.py
@@ -219,40 +219,3 @@ class PipelineModel(Model):
def copy(self, extra={}):
stages = [stage.copy(extra) for stage in self.stages]
return PipelineModel(stages)
-
-
-class Evaluator(Params):
- """
- Base class for evaluators that compute metrics from predictions.
- """
-
- __metaclass__ = ABCMeta
-
- @abstractmethod
- def _evaluate(self, dataset):
- """
- Evaluates the output.
-
- :param dataset: a dataset that contains labels/observations and
- predictions
- :return: metric
- """
- raise NotImplementedError()
-
- def evaluate(self, dataset, params={}):
- """
- Evaluates the output with optional parameters.
-
- :param dataset: a dataset that contains labels/observations and
- predictions
- :param params: an optional param map that overrides embedded
- params
- :return: metric
- """
- if isinstance(params, dict):
- if params:
- return self.copy(params)._evaluate(dataset)
- else:
- return self._evaluate(dataset)
- else:
- raise ValueError("Params must be a param map but got %s." % type(params))