Class CovarianceAudit.Config

java.lang.Object
edu.cmu.tetrad.data.audit.CovarianceAudit.Config
Enclosing class:
CovarianceAudit

public static final class CovarianceAudit.Config extends Object
The thresholds used by a CovarianceAudit's checks. Immutable; the with-methods return modified copies.
Version:
$Id: $Id
Author:
josephramsey
  • 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

      public CovarianceAudit.Config withHighCorrelation(double highCorrelation)
      Returns a config identical to this one but with the given high-correlation threshold.
      Parameters:
      highCorrelation - the new threshold.
      Returns:
      the new config.
    • withR2Determinism

      public CovarianceAudit.Config withR2Determinism(double r2Determinism)
      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

      public CovarianceAudit.Config withExtremeVarianceRatio(double extremeVarianceRatio)
      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

      public CovarianceAudit.Config withLowSampleRatio(double lowSampleRatio)
      Returns a config identical to this one but with the given low-sample-ratio threshold.
      Parameters:
      lowSampleRatio - the new threshold.
      Returns:
      the new config.