cross validation

cross validation

cross validation evaluates the predictive accuracy of an interpolation model by systematically withholding subsets of the input data, re-running estimation on the remaining samples, and comparing the predicted values against the withheld measured values. Two methods are supported: K-Fold, which divides the data into K subsets that each take a turn as the validation set, and Leave One Out, which validates each individual sample or boring one at a time.

The module accepts interpolation options from an upstream estimation module such as 3d estimation or 2d estimation and outputs a field containing the measured values, cross-validated values, and fold IDs. After a run, the Inputs and Outputs sections of the Properties panel report the settings that were used and the resulting error and correlation statistics. These values are read-only.

Ports

DirectionNameTypeDescription
InputInterpolation Options InputInterpolation OptionsThe interpolation options used for the cross-validation.
OutputOutput FieldFieldThe field containing the results of the cross-validation.

Properties

PropertyTypeDescription
Allow RunBooleanControls whether the module will run when applications are loaded or data changes. When on, the module runs when applications are loaded or the Execute button is pushed. When off, the module will not run unless Execute is pressed.
ExecuteButtonForces the module to run even if Allow Run has been turned off, allowing a number of changes to be made before updating.
Cross Validation MethodChoice: K-Fold, Leave One OutSpecifies how the dataset is partitioned for evaluation. K-Fold divides the data into K subsets (folds); the model is trained on K-1 folds and validated on the remaining fold, repeating until each fold has served once as the validation set. Leave One Out is a special case of K-Fold where the number of folds equals the number of units, so each unit is left out and validated individually.
Fold UnitChoice: Sample, BoringSpecifies how samples are grouped into folds. Sample treats each individual measurement point as its own unit. Boring groups all measurements from the same borehole together, so entire borings are divided into folds.
Number Of FoldsIntegerThe number of folds to use in K-Fold cross-validation (minimum 2). Only applicable when the K-Fold method is selected. A common choice is 5 or 10 folds, but the optimal number depends on the size and characteristics of the dataset.
Random SeedIntegerThe random seed used to partition data into folds during K-Fold cross-validation. A specific seed guarantees the same data splits each run, which is important for consistent comparison. A value of -1 uses a seed based on the current system time, producing different splits each run.
Update Information WindowBooleanWhen on, a report is sent to the Information window every time the module is run.

Processing Settings

PropertyTypeDescription
Gpu SettingsGPU OptionsGPU acceleration settings. The default for these options can be changed in the global application options menu.

Export

PropertyTypeDescription
Write As APDVFileExports the cross-validation results as an APDV file containing the measured values, cross-validated values, and fold IDs for each sample. Measured and cross-validated values reflect the pre-clip and post-clip settings.

Inputs

PropertyTypeDescription
SamplesIntegerThe total number of sample points used in the cross-validation.
BoringsIntegerThe number of distinct borings represented in the sample points used for the cross-validation.
FoldsIntegerThe effective number of folds used. For Leave One Out, this equals the number of units (samples or borings).
Analyte NameStringThe name of the analyte being cross-validated.
MethodStringThe cross-validation method that was used (K-Fold or Leave One Out) and the fold unit (Sample or Boring).
Number Of FoldsIntegerThe number of folds requested for K-Fold cross-validation. For Leave One Out, the effective fold count is reported as Folds.
Random SeedIntegerThe random seed used to partition data into folds for K-Fold cross-validation. -1 means a time-based seed.
Log ProcessedBooleanTrue when the input data is log-processed.
Is 3DBooleanTrue when the input data is three-dimensional.
Model TypeStringThe variogram model type used by the calculation (Spherical, Exponential, Gaussian, or Circular).
RangeDoubleThe variogram range used by the calculation. When fitting was enabled this is the post-fit value; otherwise it is the user-specified range.
SillDoubleThe variogram sill used by the calculation. When fitting was enabled this is the post-fit value; otherwise it is the user-specified sill.
NuggetDoubleThe variogram nugget used by the calculation. When fitting was enabled this is the post-fit value; otherwise it is the user-specified nugget.
Variogram AutofittedBooleanTrue when automatic variogram fitting was performed for this run. When true, the Range, Sill, and Nugget values are the post-fit values rather than user-specified inputs.
Anisotropy ModeStringThe anisotropy parameterization mode (Simple or Advanced).
Vertical AnisotropyDoubleThe vertical anisotropy ratio used in Simple anisotropy mode. Only meaningful when Anisotropy Mode is Simple.
HeadingDoubleThe anisotropy heading angle. Only meaningful in Advanced anisotropy mode.
DipDoubleThe anisotropy dip angle. Only meaningful in Advanced anisotropy mode on 3D inputs.
RollDoubleThe anisotropy roll angle. Only meaningful in Advanced anisotropy mode on 3D inputs.
Primary RatioDoubleThe anisotropy primary-axis ratio (HR). Only meaningful in Advanced anisotropy mode.
Secondary RatioDoubleThe anisotropy secondary-axis ratio (HV). Only meaningful in Advanced anisotropy mode on 3D inputs.

Outputs

PropertyTypeDescription
Mean ErrorDoubleThe average difference between predicted and observed values (bias). A well-fitted model should produce a value near zero.
Root Mean Square ErrorDoubleThe square root of the average squared prediction error. Measures overall prediction accuracy in the same units as the data.
Standardized RMSEDoubleThe RMSE divided by the standard deviation of the observed values. Unitless; values below 0.5 generally indicate a useful model.
Mean Absolute ErrorDoubleThe average absolute difference between predicted and observed values.
Median Absolute ErrorDoubleThe median of the absolute differences between predicted and observed values. More robust to outliers than MAE or RMSE.
Pearson CorrelationDoublePearson’s correlation coefficient (r) between predicted and observed values, ranging from -1 to 1.
R SquaredDoubleThe square of the Pearson correlation (r²): the proportion of observed variance explained by the predictions.
Concordance CorrelationDoubleLin’s Concordance Correlation Coefficient (CCC). Measures both correlation and agreement between predicted and observed values.
Nash Sutcliffe EfficiencyDoubleThe Nash-Sutcliffe Efficiency (NSE). 1 indicates perfect predictions; 0 means the model is no better than the observed mean.
Copy For ExcelButtonCopies the output statistics to the clipboard in tab-separated format, with or without headers.