Package org.apache.spark.ml.param
Class ParamMap
Object
org.apache.spark.ml.param.ParamMap
- All Implemented Interfaces:
Serializable
,scala.Serializable
A param to value map.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
Gets the value of the input param or its default value if it does not exist.boolean
Checks whether a parameter is explicitly specified.copy()
Creates a copy of this param map.static ParamMap
empty()
Returns an empty param map.Filters this param map for the given parent.<T> scala.Option<T>
Optionally returns the value associated with a param.<T> T
Returns the value associated with a param or a default value.<T> ParamMap
Puts a (param, value) pair (overwrites if the input param exists).Puts a list of param pairs (overwrites if the input params exists).Puts a list of param pairs (overwrites if the input params exists).<T> scala.Option<T>
Removes a key from this map and returns its value associated previously as an option.int
size()
Number of param pairs in this map.scala.collection.Seq<ParamPair<?>>
toSeq()
Converts this param map to a sequence of param pairs.toString()
-
Constructor Details
-
ParamMap
public ParamMap()Creates an empty param map.
-
-
Method Details
-
empty
Returns an empty param map.- Returns:
- (undocumented)
-
put
Puts a list of param pairs (overwrites if the input params exists).- Parameters:
paramPairs
- (undocumented)- Returns:
- (undocumented)
-
put
Puts a (param, value) pair (overwrites if the input param exists).- Parameters:
param
- (undocumented)value
- (undocumented)- Returns:
- (undocumented)
-
put
Puts a list of param pairs (overwrites if the input params exists).- Parameters:
paramPairs
- (undocumented)- Returns:
- (undocumented)
-
get
Optionally returns the value associated with a param.- Parameters:
param
- (undocumented)- Returns:
- (undocumented)
-
getOrElse
Returns the value associated with a param or a default value.- Parameters:
param
- (undocumented)default_
- (undocumented)- Returns:
- (undocumented)
-
apply
Gets the value of the input param or its default value if it does not exist. Raises a NoSuchElementException if there is no value associated with the input param.- Parameters:
param
- (undocumented)- Returns:
- (undocumented)
-
contains
Checks whether a parameter is explicitly specified.- Parameters:
param
- (undocumented)- Returns:
- (undocumented)
-
remove
Removes a key from this map and returns its value associated previously as an option.- Parameters:
param
- (undocumented)- Returns:
- (undocumented)
-
filter
Filters this param map for the given parent.- Parameters:
parent
- (undocumented)- Returns:
- (undocumented)
-
copy
Creates a copy of this param map.- Returns:
- (undocumented)
-
toString
-
toSeq
Converts this param map to a sequence of param pairs.- Returns:
- (undocumented)
-
size
public int size()Number of param pairs in this map.- Returns:
- (undocumented)
-