Record Class DeterministicClusters.Constraint

java.lang.Object
java.lang.Record
edu.cmu.tetrad.data.audit.DeterministicClusters.Constraint
Record Components:
determined - The name of the variable written on the left-hand side (a representation choice).
support - The names of the variables in the (screened and pruned) determining set.
coefficients - Raw-scale regression coefficients, aligned with support.
intercept - Raw-scale intercept.
fractionResidual - Residual variance of the determined variable given the support, as a fraction of its marginal variance; near zero for an exact relation.
Enclosing class:
DeterministicClusters

public static record DeterministicClusters.Constraint(String determined, List<String> support, double[] coefficients, double intercept, double fractionResidual) extends Record
One fitted constraint: determined = sum(coefficients * support) + intercept.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • Constraint

      public Constraint(String determined, List<String> support, double[] coefficients, double intercept, double fractionResidual)
      Creates an instance of a Constraint record class.
      Parameters:
      determined - the value for the determined record component
      support - the value for the support record component
      coefficients - the value for the coefficients record component
      intercept - the value for the intercept record component
      fractionResidual - the value for the fractionResidual record component
  • Method Details

    • equation

      public String equation()
      Renders the constraint as a fitted equation, e.g. "X3 = 1.2000*X1 + 0.8000*X2 + 0.0000".
      Returns:
      The equation string.
    • cluster

      public List<String> cluster()
      The full cluster this constraint speaks about: the determined variable together with its support.
      Returns:
      The member names, determined first.
    • toString

      public final 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
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • determined

      public String determined()
      Returns the value of the determined record component.
      Returns:
      the value of the determined record component
    • support

      public List<String> support()
      Returns the value of the support record component.
      Returns:
      the value of the support record component
    • coefficients

      public double[] coefficients()
      Returns the value of the coefficients record component.
      Returns:
      the value of the coefficients record component
    • intercept

      public double intercept()
      Returns the value of the intercept record component.
      Returns:
      the value of the intercept record component
    • fractionResidual

      public double fractionResidual()
      Returns the value of the fractionResidual record component.
      Returns:
      the value of the fractionResidual record component