Class NodeCVSummary
java.lang.Object
edu.cmu.tetrad.sem.NodeCVSummary
- All Implemented Interfaces:
TetradSerializable, Serializable
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
FieldsModifier and TypeFieldDescriptionfinal doubleBaseline MSE: variance of the child variable estimated from the full dataset.final doubleBaseline cross-entropy: entropy of the empirical marginal distribution of the child variable.final booleantrueif the variable is discrete.final StringVariable name.final intNumber of folds used.final doubleMean OOS MSE across folds: average of (observed - predicted)² on held-out rows.final doubleOOS R²: 1 - oosMse / baselineMse.final doubleMean OOS cross-entropy across folds on held-out rows.Parent variable names (empty for root nodes). -
Method Summary
-
Field Details
-
node
Variable name. -
discreteChild
public final boolean discreteChildtrueif the variable is discrete. -
parents
-
numFolds
public final int numFoldsNumber of folds used. -
oosMse
public final double oosMseMean 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 baselineMseBaseline 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 oosR2OOS 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 oosXentMean OOS cross-entropy across folds on held-out rows. NaN for continuous or root nodes. -
baselineXent
public final double baselineXentBaseline 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
-
toString
-