Class Param<T>

Object
org.apache.spark.ml.param.Param<T>
Type Parameters:
T - param value type
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BooleanParam, DoubleArrayArrayParam, DoubleArrayParam, DoubleParam, FloatParam, IntArrayParam, IntParam, LongParam, StringArrayParam

public class Param<T> extends Object implements Serializable
A param with self-contained documentation and optionally default value. Primitive-typed param should use the specialized versions, which are more friendly to Java users.

param: parent parent object param: name param name param: doc documentation param: isValid optional validation method which indicates if a value is valid. See ParamValidators for factory methods for common validation functions.

See Also:
  • Constructor Details

  • Method Details

    • parent

      public String parent()
    • name

      public String name()
    • doc

      public String doc()
    • isValid

      public scala.Function1<T,Object> isValid()
    • w

      public ParamPair<T> w(T value)
      Creates a param pair with the given value (for Java).
    • jsonEncode

      public String jsonEncode(T value)
      Encodes a param value into JSON, which can be decoded by `jsonDecode()`.
    • jsonDecode

      public T jsonDecode(String json)
      Decodes a param value from JSON.
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object