Skip to content
Snippets Groups Projects
Commit ce58e99a authored by Yanbo Liang's avatar Yanbo Liang Committed by Joseph K. Bradley
Browse files

[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.
parent cf95d728
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ private[shared] object SharedParamsCodeGen { ...@@ -52,7 +52,7 @@ private[shared] object SharedParamsCodeGen {
" to adjust the probability of predicting each class." + " to adjust the probability of predicting each class." +
" Array must have length equal to the number of classes, with values >= 0." + " 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" + " The class with largest value p/t is predicted, where p is the original probability" +
" of that class and t is the class' threshold.", " of that class and t is the class' threshold",
isValid = "(t: Array[Double]) => t.forall(_ >= 0)", finalMethods = false), isValid = "(t: Array[Double]) => t.forall(_ >= 0)", finalMethods = false),
ParamDesc[String]("inputCol", "input column name"), ParamDesc[String]("inputCol", "input column name"),
ParamDesc[Array[String]]("inputCols", "input column names"), ParamDesc[Array[String]]("inputCols", "input column names"),
...@@ -63,7 +63,7 @@ private[shared] object SharedParamsCodeGen { ...@@ -63,7 +63,7 @@ private[shared] object SharedParamsCodeGen {
ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")), ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")),
ParamDesc[String]("handleInvalid", "how to handle invalid entries. Options are skip (which " + ParamDesc[String]("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 " + "will filter out rows with bad values), or error (which will throw an errror). More " +
"options may be added later.", "options may be added later",
isValid = "ParamValidators.inArray(Array(\"skip\", \"error\"))"), isValid = "ParamValidators.inArray(Array(\"skip\", \"error\"))"),
ParamDesc[Boolean]("standardization", "whether to standardize the training features" + ParamDesc[Boolean]("standardization", "whether to standardize the training features" +
" before fitting the model", Some("true")), " before fitting the model", Some("true")),
...@@ -72,11 +72,11 @@ private[shared] object SharedParamsCodeGen { ...@@ -72,11 +72,11 @@ private[shared] object SharedParamsCodeGen {
" For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty", " For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty",
isValid = "ParamValidators.inRange(0, 1)"), isValid = "ParamValidators.inRange(0, 1)"),
ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms"), ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms"),
ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization."), ParamDesc[Double]("stepSize", "Step size to be used for each iteration of optimization"),
ParamDesc[String]("weightCol", "weight column name. If this is not set or empty, we treat " + ParamDesc[String]("weightCol", "weight column name. If this is not set or empty, we treat " +
"all instance weights as 1.0."), "all instance weights as 1.0"),
ParamDesc[String]("solver", "the solver algorithm for optimization. If this is not set or " + ParamDesc[String]("solver", "the solver algorithm for optimization. If this is not set or " +
"empty, default value is 'auto'.", Some("\"auto\""))) "empty, default value is 'auto'", Some("\"auto\"")))
val code = genSharedParams(params) val code = genSharedParams(params)
val file = "src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala" val file = "src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala"
......
...@@ -176,10 +176,10 @@ private[ml] trait HasThreshold extends Params { ...@@ -176,10 +176,10 @@ private[ml] trait HasThreshold extends Params {
private[ml] trait HasThresholds extends Params { private[ml] trait HasThresholds extends Params {
/** /**
* 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.. * 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.
* @group param * @group param
*/ */
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)) 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))
/** @group getParam */ /** @group getParam */
def getThresholds: Array[Double] = $(thresholds) def getThresholds: Array[Double] = $(thresholds)
...@@ -270,10 +270,10 @@ private[ml] trait HasFitIntercept extends Params { ...@@ -270,10 +270,10 @@ private[ml] trait HasFitIntercept extends Params {
private[ml] trait HasHandleInvalid extends Params { private[ml] trait HasHandleInvalid extends Params {
/** /**
* 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.. * 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.
* @group param * @group param
*/ */
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"))) 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")))
/** @group getParam */ /** @group getParam */
final def getHandleInvalid: String = $(handleInvalid) final def getHandleInvalid: String = $(handleInvalid)
...@@ -349,10 +349,10 @@ private[ml] trait HasTol extends Params { ...@@ -349,10 +349,10 @@ private[ml] trait HasTol extends Params {
private[ml] trait HasStepSize extends Params { private[ml] trait HasStepSize extends Params {
/** /**
* Param for Step size to be used for each iteration of optimization.. * Param for Step size to be used for each iteration of optimization.
* @group param * @group param
*/ */
final val stepSize: DoubleParam = new DoubleParam(this, "stepSize", "Step size to be used for each iteration of optimization.") final val stepSize: DoubleParam = new DoubleParam(this, "stepSize", "Step size to be used for each iteration of optimization")
/** @group getParam */ /** @group getParam */
final def getStepSize: Double = $(stepSize) final def getStepSize: Double = $(stepSize)
...@@ -364,10 +364,10 @@ private[ml] trait HasStepSize extends Params { ...@@ -364,10 +364,10 @@ private[ml] trait HasStepSize extends Params {
private[ml] trait HasWeightCol extends Params { private[ml] trait HasWeightCol extends Params {
/** /**
* Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0.. * Param for weight column name. If this is not set or empty, we treat all instance weights as 1.0.
* @group param * @group param
*/ */
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.") 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")
/** @group getParam */ /** @group getParam */
final def getWeightCol: String = $(weightCol) final def getWeightCol: String = $(weightCol)
...@@ -379,10 +379,10 @@ private[ml] trait HasWeightCol extends Params { ...@@ -379,10 +379,10 @@ private[ml] trait HasWeightCol extends Params {
private[ml] trait HasSolver extends Params { private[ml] trait HasSolver extends Params {
/** /**
* Param for the solver algorithm for optimization. If this is not set or empty, default value is 'auto'.. * Param for the solver algorithm for optimization. If this is not set or empty, default value is 'auto'.
* @group param * @group param
*/ */
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'.") 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'")
setDefault(solver, "auto") setDefault(solver, "auto")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment