Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed May 4, 2015
1 parent cb51e6a commit babdde7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
16 changes: 16 additions & 0 deletions python/docs/pyspark.ml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ pyspark.ml.classification module
:members:
:undoc-members:
:inherited-members:

pyspark.ml.tuning module
--------------------------------

.. automodule:: pyspark.ml.tuning
:members:
:undoc-members:
:inherited-members:

pyspark.ml.evaluation module
--------------------------------

.. automodule:: pyspark.ml.evaluation
:members:
:undoc-members:
:inherited-members:
6 changes: 4 additions & 2 deletions python/pyspark/ml/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
from pyspark.ml.param import Param, Params
from pyspark.ml.param.shared import HasLabelCol, HasRawPredictionCol
from pyspark.ml.util import keyword_only
from pyspark.mllib.common import inherit_doc

__all__ = ['BinaryClassificationEvaluator']


@inherit_doc
class BinaryClassificationEvaluator(JavaEvaluator, HasLabelCol, HasRawPredictionCol):
"""
Evaluator for binary classification, which expects two input
Expand Down Expand Up @@ -51,7 +53,7 @@ class BinaryClassificationEvaluator(JavaEvaluator, HasLabelCol, HasRawPrediction
def __init__(self, rawPredictionCol="rawPrediction", labelCol="label",
metricName="areaUnderROC"):
"""
__init__(self, rawPredictionCol="rawPrediction", labelCol="label",
__init__(self, rawPredictionCol="rawPrediction", labelCol="label", \
metricName="areaUnderROC")
"""
super(BinaryClassificationEvaluator, self).__init__()
Expand Down Expand Up @@ -80,7 +82,7 @@ def getMetricName(self):
def setParams(self, rawPredictionCol="rawPrediction", labelCol="label",
metricName="areaUnderROC"):
"""
setParams(self, rawPredictionCol="rawPrediction", labelCol="label",
setParams(self, rawPredictionCol="rawPrediction", labelCol="label", \
metricName="areaUnderROC")
Sets params for binary classification evaluator.
"""
Expand Down
5 changes: 3 additions & 2 deletions python/pyspark/ml/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ class Evaluator(object):
def evaluate(self, dataset, params={}):
"""
Evaluates the output.
:param dataset: a dataset that contains labels/observations
and predictions
:param dataset: a dataset that contains labels/observations and
predictions
:param params: an optional param map that overrides embedded
params
:return: metric
Expand Down

0 comments on commit babdde7

Please sign in to comment.