Package org.apache.spark.ml.param
Class ParamValidators
Object
org.apache.spark.ml.param.ParamValidators
Factory methods for common validation functions for 
Param.isValid.
 The numerical methods only support Int, Long, Float, and Double.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionarrayLengthGt(double lowerBound) Check that the array length is greater than lowerBound.static voidcheckSingleVsMultiColumnParams(Params model, scala.collection.immutable.Seq<Param<?>> singleColumnParams, scala.collection.immutable.Seq<Param<?>> multiColumnParams) Utility for Param validity checks for Transformers which have both single- and multi-column support.static <T> scala.Function1<T,Object> gt(double lowerBound) Check if value is greater than lowerBoundstatic <T> scala.Function1<T,Object> gtEq(double lowerBound) Check if value is greater than or equal to lowerBoundstatic <T> scala.Function1<T,Object> Check for value in an allowed set of values.static <T> scala.Function1<T,Object> Check for value in an allowed set of values.static <T> scala.Function1<T,Object> inRange(double lowerBound, double upperBound) Version of `inRange()` which uses inclusive be default: [lowerBound, upperBound]static <T> scala.Function1<T,Object> inRange(double lowerBound, double upperBound, boolean lowerInclusive, boolean upperInclusive) Check for value in range lowerBound to upperBound.static <T> scala.Function1<T,Object> lt(double upperBound) Check if value is less than upperBoundstatic <T> scala.Function1<T,Object> ltEq(double upperBound) Check if value is less than or equal to upperBound
- 
Constructor Details- 
ParamValidatorspublic ParamValidators()
 
- 
- 
Method Details- 
gtCheck if value is greater than lowerBound- Parameters:
- lowerBound- (undocumented)
- Returns:
- (undocumented)
 
- 
gtEqCheck if value is greater than or equal to lowerBound- Parameters:
- lowerBound- (undocumented)
- Returns:
- (undocumented)
 
- 
ltCheck if value is less than upperBound- Parameters:
- upperBound- (undocumented)
- Returns:
- (undocumented)
 
- 
ltEqCheck if value is less than or equal to upperBound- Parameters:
- upperBound- (undocumented)
- Returns:
- (undocumented)
 
- 
inRangepublic static <T> scala.Function1<T,Object> inRange(double lowerBound, double upperBound, boolean lowerInclusive, boolean upperInclusive) Check for value in range lowerBound to upperBound.- Parameters:
- lowerInclusive- if true, range includes value = lowerBound
- upperInclusive- if true, range includes value = upperBound
- lowerBound- (undocumented)
- upperBound- (undocumented)
- Returns:
- (undocumented)
 
- 
inRangeVersion of `inRange()` which uses inclusive be default: [lowerBound, upperBound]
- 
inArrayCheck for value in an allowed set of values.
- 
inArrayCheck for value in an allowed set of values.
- 
arrayLengthGtCheck that the array length is greater than lowerBound.
- 
checkSingleVsMultiColumnParamspublic static void checkSingleVsMultiColumnParams(Params model, scala.collection.immutable.Seq<Param<?>> singleColumnParams, scala.collection.immutable.Seq<Param<?>> multiColumnParams) Utility for Param validity checks for Transformers which have both single- and multi-column support. This utility assumes thatinputColindicates single-column usage and thatinputColsindicates multi-column usage.This checks to ensure that exactly one set of Params has been set, and it raises an IllegalArgumentExceptionif not.- Parameters:
- singleColumnParams- Params which should be set (or have defaults) if- inputColhas been set. This does not need to include- inputCol.
- multiColumnParams- Params which should be set (or have defaults) if- inputColshas been set. This does not need to include- inputCols.
- model- (undocumented)
 
 
-