Skip to content

Commit afecd4e

Browse files
committed
Add a param to skip invalid entries.
1 parent 70beb80 commit afecd4e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ private[shared] object SharedParamsCodeGen {
5353
ParamDesc[Int]("checkpointInterval", "checkpoint interval (>= 1)",
5454
isValid = "ParamValidators.gtEq(1)"),
5555
ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")),
56+
ParamDesc[Boolean]("skipInvalid", "whether to skip invalid entries"),
5657
ParamDesc[Boolean]("standardization", "whether to standardize the training features" +
5758
" prior to fitting the model sequence. Note that the coefficients of models are" +
5859
" always returned on the original scale.", Some("true")),

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,21 @@ private[ml] trait HasFitIntercept extends Params {
233233
final def getFitIntercept: Boolean = $(fitIntercept)
234234
}
235235

236+
/**
237+
* (private[ml]) Trait for shared param skipInvalid.
238+
*/
239+
private[ml] trait HasSkipInvalid extends Params {
240+
241+
/**
242+
* Param for whether to skip invalid entries.
243+
* @group param
244+
*/
245+
final val skipInvalid: BooleanParam = new BooleanParam(this, "skipInvalid", "whether to skip invalid entries")
246+
247+
/** @group getParam */
248+
final def getSkipInvalid: Boolean = $(skipInvalid)
249+
}
250+
236251
/**
237252
* (private[ml]) Trait for shared param standardization (default: true).
238253
*/

0 commit comments

Comments
 (0)