Skip to content

Commit ce58e99

Browse files
yanboliangjkbradley
authored andcommitted
[MINOR][ML][DOC] Remove duplicated periods at the end of some sharedParam
## What changes were proposed in this pull request? Remove duplicated periods at the end of some sharedParams in ScalaDoc, such as [here](https://github.com/apache/spark/pull/11344/files#diff-9edc669edcf2c0c7cf1efe4a0a57da80L367) cc mengxr srowen ## How was this patch tested? Documents change, no test. Author: Yanbo Liang <ybliang8@gmail.com> Closes #11344 from yanboliang/shared-cleanup.
1 parent cf95d72 commit ce58e99

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private[shared] object SharedParamsCodeGen {
5252
" to adjust the probability of predicting each class." +
5353
" Array must have length equal to the number of classes, with values >= 0." +
5454
" The class with largest value p/t is predicted, where p is the original probability" +
55-
" of that class and t is the class' threshold.",
55+
" of that class and t is the class' threshold",
5656
isValid = "(t: Array[Double]) => t.forall(_ >= 0)", finalMethods = false),
5757
ParamDesc[String]("inputCol", "input column name"),
5858
ParamDesc[Array[String]]("inputCols", "input column names"),
@@ -63,7 +63,7 @@ private[shared] object SharedParamsCodeGen {
6363
ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")),
6464
ParamDesc[String]("handleInvalid", "how to handle invalid entries. Options are skip (which " +
6565
"will filter out rows with bad values), or error (which will throw an errror). More " +
66-
"options may be added later.",
66+
"options may be added later",
6767
isValid = "ParamValidators.inArray(Array(\"skip\", \"error\"))"),
6868
ParamDesc[Boolean]("standardization", "whether to standardize the training features" +
6969
" before fitting the model", Some("true")),
@@ -72,11 +72,11 @@ private[shared] object SharedParamsCodeGen {
7272
" For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty",
7373
isValid = "ParamValidators.inRange(0, 1)"),
7474
ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms"),
75-
ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization."),
75+
ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization"),
7676
ParamDesc[String]("weightCol", "weight column name. If this is not set or empty, we treat " +
77-
"all instance weights as 1.0."),
77+
"all instance weights as 1.0"),
7878
ParamDesc[String]("solver", "the solver algorithm for optimization. If this is not set or " +
79-
"empty, default value is 'auto'.", Some("\"auto\"")))
79+
"empty, default value is 'auto'", Some("\"auto\"")))
8080

8181
val code = genSharedParams(params)
8282
val file = "src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala"

mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ private[ml] trait HasThreshold extends Params {
176176
private[ml] trait HasThresholds extends Params {
177177

178178
/**
179-
* Param for Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold..
179+
* Param for Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold.
180180
* @group param
181181
*/
182-
final val thresholds: DoubleArrayParam = new DoubleArrayParam(this, "thresholds", "Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold.", (t: Array[Double]) => t.forall(_ >= 0))
182+
final val thresholds: DoubleArrayParam = new DoubleArrayParam(this, "thresholds", "Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold", (t: Array[Double]) => t.forall(_ >= 0))
183183

184184
/** @group getParam */
185185
def getThresholds: Array[Double] = $(thresholds)
@@ -270,10 +270,10 @@ private[ml] trait HasFitIntercept extends Params {
270270
private[ml] trait HasHandleInvalid extends Params {
271271

272272
/**
273-
* Param for how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later..
273+
* Param for how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later.
274274
* @group param
275275
*/
276-
final val handleInvalid: Param[String] = new Param[String](this, "handleInvalid", "how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later.", ParamValidators.inArray(Array("skip", "error")))
276+
final val handleInvalid: Param[String] = new Param[String](this, "handleInvalid", "how to handle invalid entries. Options are skip (which will filter out rows with bad values), or error (which will throw an errror). More options may be added later", ParamValidators.inArray(Array("skip", "error")))
277277

278278
/** @group getParam */
279279
final def getHandleInvalid: String = $(handleInvalid)
@@ -349,10 +349,10 @@ private[ml] trait HasTol extends Params {
349349
private[ml] trait HasStepSize extends Params {
350350

351351
/**
352-
* Param for Step size to be used for each iteration of optimization..
352+
* Param for Step size to be used for each iteration of optimization.
353353
* @group param
354354
*/
355-
final val stepSize: DoubleParam = new DoubleParam(this, "stepSize", "Step size to be used for each iteration of optimization.")
355+
final val stepSize: DoubleParam = new DoubleParam(this, "stepSize", "Step size to be used for each iteration of optimization")
356356

357357
/** @group getParam */
358358
final def getStepSize: Double = $(stepSize)
@@ -364,10 +364,10 @@ private[ml] trait HasStepSize extends Params {
364364
private[ml] trait HasWeightCol extends Params {
365365

366366
/**
367-
* Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0..
367+
* Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0.
368368
* @group param
369369
*/
370-
final val weightCol: Param[String] = new Param[String](this, "weightCol", "weight column name. If this is not set or empty, we treat all instance weights as 1.0.")
370+
final val weightCol: Param[String] = new Param[String](this, "weightCol", "weight column name. If this is not set or empty, we treat all instance weights as 1.0")
371371

372372
/** @group getParam */
373373
final def getWeightCol: String = $(weightCol)
@@ -379,10 +379,10 @@ private[ml] trait HasWeightCol extends Params {
379379
private[ml] trait HasSolver extends Params {
380380

381381
/**
382-
* Param for the solver algorithm for optimization. If this is not set or empty, default value is 'auto'..
382+
* Param for the solver algorithm for optimization. If this is not set or empty, default value is 'auto'.
383383
* @group param
384384
*/
385-
final val solver: Param[String] = new Param[String](this, "solver", "the solver algorithm for optimization. If this is not set or empty, default value is 'auto'.")
385+
final val solver: Param[String] = new Param[String](this, "solver", "the solver algorithm for optimization. If this is not set or empty, default value is 'auto'")
386386

387387
setDefault(solver, "auto")
388388

0 commit comments

Comments
 (0)