Class CovarianceAudit.Config
java.lang.Object
edu.cmu.tetrad.data.audit.CovarianceAudit.Config
- Enclosing class:
CovarianceAudit
The thresholds used by a
CovarianceAudit's checks. Immutable; the with-methods return modified
copies.- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
ConstructorsConstructorDescriptionConfig()Constructs a config with default thresholds.Config(double symmetryTolerance, double duplicateCorrelationTolerance, double highCorrelation, double r2Determinism, double psdTolerance, double rankTolerance, double extremeVarianceRatio, double lowSampleRatio) Constructs a config with the given thresholds. -
Method Summary
Modifier and TypeMethodDescriptionwithDuplicateCorrelationTolerance(double duplicateCorrelationTolerance) Returns a config identical to this one but with the given duplicate-correlation tolerance.withExtremeVarianceRatio(double extremeVarianceRatio) Returns a config identical to this one but with the given extreme-variance-ratio threshold.withHighCorrelation(double highCorrelation) Returns a config identical to this one but with the given high-correlation threshold.withLowSampleRatio(double lowSampleRatio) Returns a config identical to this one but with the given low-sample-ratio threshold.withR2Determinism(double r2Determinism) Returns a config identical to this one but with the given R-squared determinism threshold.
-
Constructor Details
-
Config
public Config()Constructs a config with default thresholds. -
Config
public Config(double symmetryTolerance, double duplicateCorrelationTolerance, double highCorrelation, double r2Determinism, double psdTolerance, double rankTolerance, double extremeVarianceRatio, double lowSampleRatio) Constructs a config with the given thresholds. See the field documentation for meanings.- Parameters:
symmetryTolerance- relative tolerance for COVARIANCE_NOT_SYMMETRIC.duplicateCorrelationTolerance- tolerance for DUPLICATE_COLUMNS.highCorrelation- threshold for HIGH_CORRELATION.r2Determinism- threshold for NEAR_DETERMINISM_LINEAR.psdTolerance- relative eigenvalue tolerance for COVARIANCE_NOT_PSD.rankTolerance- relative eigenvalue tolerance for the rank.extremeVarianceRatio- threshold for EXTREME_VARIANCE_SCALE.lowSampleRatio- threshold for LOW_SAMPLE_RATIO.
-
-
Method Details
-
withHighCorrelation
Returns a config identical to this one but with the given high-correlation threshold.- Parameters:
highCorrelation- the new threshold.- Returns:
- the new config.
-
withR2Determinism
Returns a config identical to this one but with the given R-squared determinism threshold.- Parameters:
r2Determinism- the new threshold.- Returns:
- the new config.
-
withDuplicateCorrelationTolerance
public CovarianceAudit.Config withDuplicateCorrelationTolerance(double duplicateCorrelationTolerance) Returns a config identical to this one but with the given duplicate-correlation tolerance.- Parameters:
duplicateCorrelationTolerance- the new tolerance.- Returns:
- the new config.
-
withExtremeVarianceRatio
Returns a config identical to this one but with the given extreme-variance-ratio threshold.- Parameters:
extremeVarianceRatio- the new threshold.- Returns:
- the new config.
-
withLowSampleRatio
Returns a config identical to this one but with the given low-sample-ratio threshold.- Parameters:
lowSampleRatio- the new threshold.- Returns:
- the new config.
-