Record Class Intercept

java.lang.Object
java.lang.Record
smile.data.formula.Intercept
Record Components:
bias - The flag if the model has the intercept.
All Implemented Interfaces:
Serializable, Term

public record Intercept(boolean bias) extends Record implements Term
The flag if intercept should be included in the model.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Intercept(boolean bias)
    Creates an instance of a Intercept record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the bias record component.
    bind(StructType schema)
    Binds the term to a schema.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns a string representation of this record class.
    Returns the set of variables used in this term.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface smile.data.formula.Term

    expand
  • Constructor Details

    • Intercept

      public Intercept(boolean bias)
      Creates an instance of a Intercept record class.
      Parameters:
      bias - the value for the bias record component
  • Method Details

    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • variables

      public Set<String> variables()
      Description copied from interface: Term
      Returns the set of variables used in this term.
      Specified by:
      variables in interface Term
      Returns:
      the set of variables used in this term.
    • bind

      public List<Feature> bind(StructType schema)
      Description copied from interface: Term
      Binds the term to a schema.
      Specified by:
      bind in interface Term
      Parameters:
      schema - the schema to bind the term with.
      Returns:
      the feature list.
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • bias

      public boolean bias()
      Returns the value of the bias record component.
      Returns:
      the value of the bias record component