Class PredictionPruneReport

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

public final class PredictionPruneReport extends Object implements TetradSerializable
Result of NNEstimator.pruneByPredictiveContribution(int, double): a per-child backward elimination of parents whose held-out predictive contribution is not distinguishable from zero.

For each candidate parent X of a child Y, the current model (Y's mechanism with the current working parent set) and a reduced model (retrained without X) both predict the held-out rows of the same k folds used by NNEstimator.crossValidate(int). This yields one paired improvement per fold: ΔR² for a continuous child, Δ cross-entropy in nats for a discrete one. A parent is kept when the fold-mean improvement exceeds threshold standard errors of the fold spread. While any parent fails, the one with the smallest t-statistic is removed, the child's fold mechanisms are retrained on the surviving parents, and the survivors are re-tested — so a redundant pair loses at most one member.

Deletion means "adds no unique out-of-sample predictive information given the surviving parents," which is a statement about predictive redundancy, not causal absence. The proposed graph should be reviewed, not silently adopted; and any metrics computed after re-estimation on the same folds are optimistic, because those folds were consumed by the selection.

See Also:
  • Method Details

    • getDeletions

      public List<PredictionPruneReport.Deletion> getDeletions()
      The proposed deletions, sorted by child name and elimination step.
      Returns:
      an unmodifiable list of proposed deletions
    • getPrunedGraph

      public Graph getPrunedGraph()
      A copy of the input DAG with the proposed deletions removed.
      Returns:
      the pruned graph
    • getNumFolds

      public int getNumFolds()
      The number of CV folds used.
      Returns:
      the number of folds
    • getThreshold

      public double getThreshold()
      The keep threshold in standard errors.
      Returns:
      the threshold
    • toText

      public String toText()
      A human-readable summary, one line per proposed deletion.
      Returns:
      a human-readable summary
    • toString

      public String toString()
      Overrides:
      toString in class Object