org.apache.spark.ml.param
Class ParamMap

Object
  extended by org.apache.spark.ml.param.ParamMap
All Implemented Interfaces:
java.io.Serializable

public final class ParamMap
extends Object
implements scala.Serializable

:: Experimental :: A param to value map.

See Also:
Serialized Form

Constructor Summary
ParamMap()
          Creates an empty param map.
 
Method Summary
<T> T
apply(Param<T> param)
          Gets the value of the input param or its default value if it does not exist.
 boolean contains(Param<?> param)
          Checks whether a parameter is explicitly specified.
 ParamMap copy()
          Creates a copy of this param map.
static ParamMap empty()
          Returns an empty param map.
 ParamMap filter(Params parent)
          Filters this param map for the given parent.
<T> scala.Option<T>
get(Param<T> param)
          Optionally returns the value associated with a param.
<T> T
getOrElse(Param<T> param, T default_)
          Returns the value associated with a param or a default value.
<T> ParamMap
put(Param<T> param, T value)
          Puts a (param, value) pair (overwrites if the input param exists).
 ParamMap put(ParamPair<?>... paramPairs)
          Puts a list of param pairs (overwrites if the input params exists).
 ParamMap put(scala.collection.Seq<ParamPair<?>> paramPairs)
          Puts a list of param pairs (overwrites if the input params exists).
<T> scala.Option<T>
remove(Param<T> param)
          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.
 String toString()
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParamMap

public ParamMap()
Creates an empty param map.

Method Detail

empty

public static ParamMap empty()
Returns an empty param map.

Returns:
(undocumented)

put

public ParamMap put(ParamPair<?>... paramPairs)
Puts a list of param pairs (overwrites if the input params exists).

Parameters:
paramPairs - (undocumented)
Returns:
(undocumented)

put

public <T> ParamMap put(Param<T> param,
                        T value)
Puts a (param, value) pair (overwrites if the input param exists).

Parameters:
param - (undocumented)
value - (undocumented)
Returns:
(undocumented)

put

public ParamMap put(scala.collection.Seq<ParamPair<?>> paramPairs)
Puts a list of param pairs (overwrites if the input params exists).

Parameters:
paramPairs - (undocumented)
Returns:
(undocumented)

get

public <T> scala.Option<T> get(Param<T> param)
Optionally returns the value associated with a param.

Parameters:
param - (undocumented)
Returns:
(undocumented)

getOrElse

public <T> T getOrElse(Param<T> param,
                       T default_)
Returns the value associated with a param or a default value.

Parameters:
param - (undocumented)
default_ - (undocumented)
Returns:
(undocumented)

apply

public <T> T apply(Param<T> param)
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

public boolean contains(Param<?> param)
Checks whether a parameter is explicitly specified.

Parameters:
param - (undocumented)
Returns:
(undocumented)

remove

public <T> scala.Option<T> remove(Param<T> param)
Removes a key from this map and returns its value associated previously as an option.

Parameters:
param - (undocumented)
Returns:
(undocumented)

filter

public ParamMap filter(Params parent)
Filters this param map for the given parent.

Parameters:
parent - (undocumented)
Returns:
(undocumented)

copy

public ParamMap copy()
Creates a copy of this param map.

Returns:
(undocumented)

toString

public String toString()
Overrides:
toString in class Object

toSeq

public scala.collection.Seq<ParamPair<?>> 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)