Skip to content

Commit 8285134

Browse files
committed
update doc
1 parent 060f7c3 commit 8285134

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ private[ml] trait CrossValidatorParams extends Params {
5252
def getEstimatorParamMaps: Array[ParamMap] = $(estimatorParamMaps)
5353

5454
/**
55-
* param for the evaluator for selection
55+
* param for the evaluator used to select hyper-parameters that maximize the cross-validated
56+
* metric
5657
* @group param
5758
*/
58-
val evaluator: Param[Evaluator] = new Param(this, "evaluator", "evaluator for selection")
59+
val evaluator: Param[Evaluator] = new Param(this, "evaluator",
60+
"evaluator used to select hyper-parameters that maximize the cross-validated metric")
5961

6062
/** @group getParam */
6163
def getEvaluator: Evaluator = $(evaluator)

python/pyspark/ml/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def transform(self, dataset, params={}):
7373
@inherit_doc
7474
class Model(Transformer):
7575
"""
76-
Abstract class for models that fitted by estimators.
76+
Abstract class for models that are fitted by estimators.
7777
"""
7878

7979
__metaclass__ = ABCMeta
@@ -163,7 +163,7 @@ def fit(self, dataset, params={}):
163163

164164

165165
@inherit_doc
166-
class PipelineModel(Transformer):
166+
class PipelineModel(Model):
167167
"""
168168
Represents a compiled pipeline with transformers and fitted models.
169169
"""

python/pyspark/ml/tuning.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ class CrossValidator(Estimator):
116116
estimatorParamMaps = Param(Params._dummy(), "estimatorParamMaps", "estimator param maps")
117117

118118
# a placeholder to make it appear in the generated doc
119-
evaluator = Param(Params._dummy(), "evaluator", "evaluator for selection")
119+
evaluator = Param(
120+
Params._dummy(), "evaluator",
121+
"evaluator used to select hyper-parameters that maximize the cross-validated metric")
120122

121123
# a placeholder to make it appear in the generated doc
122124
numFolds = Param(Params._dummy(), "numFolds", "number of folds for cross validation")
@@ -131,8 +133,11 @@ def __init__(self, estimator=None, estimatorParamMaps=None, evaluator=None, numF
131133
self.estimator = Param(self, "estimator", "estimator to be cross-validated")
132134
#: param for estimator param maps
133135
self.estimatorParamMaps = Param(self, "estimatorParamMaps", "estimator param maps")
134-
#: param for evaluator for selection
135-
self.evaluator = Param(self, "evaluator", "evaluator for selection")
136+
#: param for the evaluator used to select hyper-parameters that
137+
#: maximize the cross-validated metric
138+
self.evaluator = Param(
139+
self, "evaluator",
140+
"evaluator used to select hyper-parameters that maximize the cross-validated metric")
136141
#: param for number of folds for cross validation
137142
self.numFolds = Param(self, "numFolds", "number of folds for cross validation")
138143
self._setDefault(numFolds=3)
@@ -228,7 +233,7 @@ def fit(self, dataset, params={}):
228233

229234
class CrossValidatorModel(Model):
230235
"""
231-
Model from k-fold corss validation.
236+
Model from k-fold cross validation.
232237
"""
233238

234239
def __init__(self, bestModel):

0 commit comments

Comments
 (0)