Skip to content

PD Cross Validation

nikitin-pro edited this page Jun 20, 2026 · 4 revisions

Cross-Validation

The cross-validation module assesses model reliability through two complementary mechanisms: physics-informed validation and data-driven consensus.

Cross-validation routine Cross-validation routine

A-Rules: Physics-Based Tests

Each A-Rule tests whether a model respects a fundamental physical law within its local neighborhood in the design space. For each model and each rule:

  1. For each design point, find the $k$ nearest neighbors in the model's input context space using a Ball Tree.
  2. Compute the Spearman rank correlation between the rule's transformed input (e.g., viscous stress $\mu U_s/D_p^2$) and output (e.g., $\Delta P/L$) across the neighborhood.
  3. Compare the observed correlation direction against the expected physical relationship (positive or negative monotonicity).
  4. Assign a validity score (0–1) based on correlation strength; unreliable neighborhoods (too sparse, too uniform) are skipped.
A-type rule routine A-type rule routine

**Currently implemented A-Rules:**

$$ \frac{\Delta P}{L}\propto \frac{\mu_G\cdot U_s}{ D_p^2} \quad \text{at } Re_m < 1000 \text{ (laminar stress test)}; $$

$$ \frac{\Delta P}{L}\propto \frac{\rho_G\cdot U_s^2}{ D_p} \quad \text{at } Re_m > 10 \text{ (turbulent stress test)}. $$

Weighted Median Consensus

At each design point, a consensus $\Delta P$ is computed as the weighted median of all valid model predictions, weighted by each model's current validity score. The confidence in the consensus accounts for:

  • Number of contributing models (density penalty for sparse coverage).
  • Agreement among models (coefficient of variation).
  • Average validity of contributing models.
Generalized routine for initial and final consensuses
Generalized routine for initial and final consensuses

Model Alignment

After consensus, each model's predictions are compared against the consensus. Models that consistently deviate are penalized or discarded, and the final consensus is recomputed.

Clone this wiki locally