Param (Spark 3.5.5 JavaDoc) (original) (raw)
Object
- org.apache.spark.ml.param.Param
Type Parameters:
T
- param value type
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BooleanParam, DoubleArrayArrayParam, DoubleArrayParam, DoubleParam, FloatParam, IntArrayParam, IntParam, LongParam, StringArrayParam
public class Param
extends Object
implements scala.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:
Serialized Form
Constructor Summary
Constructors
Constructor and Description Param(Identifiable parent, String name, String doc) Param(Identifiable parent, String name, String doc, scala.Function1<T,Object> isValid) Param(String parent, String name, String doc) Param(String parent, String name, String doc, scala.Function1<T,Object> isValid) Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type Method and Description String doc() boolean equals(Object obj) int hashCode() scala.Function1<T,Object> isValid() T jsonDecode(String json) Decodes a param value from JSON. String jsonEncode(T value) Encodes a param value into JSON, which can be decoded by `jsonDecode()`. String name() String parent() String toString() ParamPair<T> w(T value) Creates a param pair with the given value (for Java). * ### Methods inherited from class Object `getClass, notify, notifyAll, wait, wait, wait`
Constructor Detail
* #### Param public Param(String parent, String name, String doc, scala.Function1<[T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param"),Object> isValid) * #### Param public Param([Identifiable](../../../../../org/apache/spark/ml/util/Identifiable.html "interface in org.apache.spark.ml.util") parent, String name, String doc, scala.Function1<[T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param"),Object> isValid) * #### Param public Param(String parent, String name, String doc) * #### Param public Param([Identifiable](../../../../../org/apache/spark/ml/util/Identifiable.html "interface in org.apache.spark.ml.util") parent, String name, String doc)
Method Detail
* #### parent public String parent() * #### name public String name() * #### doc public String doc() * #### isValid public scala.Function1<[T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param"),Object> isValid() * #### w public [ParamPair](../../../../../org/apache/spark/ml/param/ParamPair.html "class in org.apache.spark.ml.param")<[T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param")> w([T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param") value) Creates a param pair with the given value (for Java). * #### jsonEncode public String jsonEncode([T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param") value) Encodes a param value into JSON, which can be decoded by \`jsonDecode()\`. * #### jsonDecode public [T](../../../../../org/apache/spark/ml/param/Param.html "type parameter in Param") 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`