Class NodeCVSummary

java.lang.Object
edu.cmu.tetrad.sem.NodeCVSummary
All Implemented Interfaces:
TetradSerializable, Serializable

public final class NodeCVSummary extends Object implements TetradSerializable
Immutable per-node summary produced by k-fold cross-validation in NNEstimator#crossValidate(int).

For continuous nodes the primary OOS metric is oosMse and the derived oosR2 (improvement over predicting the marginal mean). For discrete nodes the primary metric is oosXent (average cross-entropy on held-out rows).

Root nodes (no parents) have no conditional prediction and carry Double.NaN for all prediction metrics.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Baseline MSE: variance of the child variable estimated from the full dataset.
    final double
    Baseline cross-entropy: entropy of the empirical marginal distribution of the child variable.
    final boolean
    true if the variable is discrete.
    final String
    Variable name.
    final int
    Number of folds used.
    final double
    Mean OOS MSE across folds: average of (observed - predicted)² on held-out rows.
    final double
    OOS R²: 1 - oosMse / baselineMse.
    final double
    Mean OOS cross-entropy across folds on held-out rows.
    final List<String>
    Parent variable names (empty for root nodes).
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • node

      public final String node
      Variable name.
    • discreteChild

      public final boolean discreteChild
      true if the variable is discrete.
    • parents

      public final List<String> parents
      Parent variable names (empty for root nodes).
    • numFolds

      public final int numFolds
      Number of folds used.
    • oosMse

      public final double oosMse
      Mean OOS MSE across folds: average of (observed - predicted)² on held-out rows. Uses zero-noise prediction (conditional mean estimate). NaN for discrete or root nodes.
    • baselineMse

      public final double baselineMse
      Baseline MSE: variance of the child variable estimated from the full dataset. This is the MSE you would get by always predicting the marginal mean.
    • oosR2

      public final double oosR2
      OOS R²: 1 - oosMse / baselineMse. Positive means the NN beats the mean baseline out of sample. NaN if either component is NaN.
    • oosXent

      public final double oosXent
      Mean OOS cross-entropy across folds on held-out rows. NaN for continuous or root nodes.
    • baselineXent

      public final double baselineXent
      Baseline cross-entropy: entropy of the empirical marginal distribution of the child variable. This is the cross-entropy you would get by always predicting the marginal class probabilities.
  • Method Details