Record Class MissingnessIndicatorAdder.Spec
java.lang.Object
java.lang.Record
edu.cmu.tetrad.search.utils.MissingnessIndicatorAdder.Spec
- Record Components:
minRate- Minimum missingness rate for a variable to get an indicator.maxRate- Maximum missingness rate for a variable to get an indicator.discreteIndicators- If true, indicators are binary discrete variables with categories "observed" and "missing"; if false, continuous 0/1 columns.attachKnowledge- If true, knowledge is attached to the result placing the substantive variables in tier 0 and the indicators in tier 1, so that no indicator can be a cause of a substantive variable.forbidSelfMasking- If true, and knowledge is attached, the edge from each variable to its own indicator is forbidden, since it cannot be scored from the observed cases.suffix- Suffix appended to the variable name to form the indicator name.
- Enclosing class:
MissingnessIndicatorAdder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theattachKnowledgerecord component.defaults()Returns the default spec: discrete indicators for every variable whose missingness rate lies between 0.02 and 0.98, with tier knowledge attached and self-masking forbidden.booleanReturns the value of thediscreteIndicatorsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theforbidSelfMaskingrecord component.final inthashCode()Returns a hash code value for this object.doublemaxRate()Returns the value of themaxRaterecord component.doubleminRate()Returns the value of theminRaterecord component.suffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.withDiscreteIndicators(boolean discrete) Returns a copy of this spec with the given indicator type.withKnowledge(boolean attach, boolean forbidSelfMasking) Returns a copy of this spec with the given knowledge settings.withRateWindow(double minRate, double maxRate) Returns a copy of this spec with the given rate window.withSuffix(String suffix) Returns a copy of this spec with the given indicator name suffix.
-
Constructor Details
-
Spec
public Spec(double minRate, double maxRate, boolean discreteIndicators, boolean attachKnowledge, boolean forbidSelfMasking, String suffix) Canonical constructor, with validation.
-
-
Method Details
-
defaults
Returns the default spec: discrete indicators for every variable whose missingness rate lies between 0.02 and 0.98, with tier knowledge attached and self-masking forbidden.- Returns:
- the default spec.
-
withRateWindow
Returns a copy of this spec with the given rate window.- Parameters:
minRate- the minimum rate.maxRate- the maximum rate.- Returns:
- the modified copy.
-
withDiscreteIndicators
Returns a copy of this spec with the given indicator type.- Parameters:
discrete- true for discrete indicators, false for continuous 0/1 columns.- Returns:
- the modified copy.
-
withKnowledge
Returns a copy of this spec with the given knowledge settings.- Parameters:
attach- whether to attach tier knowledge.forbidSelfMasking- whether to forbid each variable to cause its own indicator.- Returns:
- the modified copy.
-
withSuffix
Returns a copy of this spec with the given indicator name suffix.- Parameters:
suffix- the suffix.- Returns:
- the modified copy.
-
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. -
minRate
-
maxRate
-
discreteIndicators
public boolean discreteIndicators()Returns the value of thediscreteIndicatorsrecord component.- Returns:
- the value of the
discreteIndicatorsrecord component
-
attachKnowledge
public boolean attachKnowledge()Returns the value of theattachKnowledgerecord component.- Returns:
- the value of the
attachKnowledgerecord component
-
forbidSelfMasking
public boolean forbidSelfMasking()Returns the value of theforbidSelfMaskingrecord component.- Returns:
- the value of the
forbidSelfMaskingrecord component
-
suffix
-