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
-
Constructor Summary
ConstructorsConstructorDescriptionConstraint(String determined, List<String> support, double[] coefficients, double intercept, double fractionResidual) Creates an instance of aConstraintrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncluster()The full cluster this constraint speaks about: the determined variable together with its support.double[]Returns the value of thecoefficientsrecord component.Returns the value of thedeterminedrecord component.final booleanIndicates whether some other object is "equal to" this one.equation()Renders the constraint as a fitted equation, e.g.doubleReturns the value of thefractionResidualrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of theinterceptrecord component.support()Returns the value of thesupportrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Constraint
public Constraint(String determined, List<String> support, double[] coefficients, double intercept, double fractionResidual) Creates an instance of aConstraintrecord class.- Parameters:
determined- the value for thedeterminedrecord componentsupport- the value for thesupportrecord componentcoefficients- the value for thecoefficientsrecord componentintercept- the value for theinterceptrecord componentfractionResidual- the value for thefractionResidualrecord component
-
-
Method Details
-
equation
Renders the constraint as a fitted equation, e.g. "X3 = 1.2000*X1 + 0.8000*X2 + 0.0000".- Returns:
- The equation string.
-
cluster
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
determined
Returns the value of thedeterminedrecord component.- Returns:
- the value of the
determinedrecord component
-
support
-
coefficients
public double[] coefficients()Returns the value of thecoefficientsrecord component.- Returns:
- the value of the
coefficientsrecord component
-
intercept
-
fractionResidual
public double fractionResidual()Returns the value of thefractionResidualrecord component.- Returns:
- the value of the
fractionResidualrecord component
-