Skip to main content
FPDE includes validation helpers for choosing explanation settings. Use them when you want a reproducible fixed configuration before explaining evaluation or test samples.

Select lambda_hyb

FPDEEngine.select_lambda evaluates a grid of lambda_hyb candidates on held-out samples. For each candidate, it computes deletion and insertion curves.
The combined score is:
The selected lambda is the candidate with the best validation score. Use the selected value for later calls to explain_one, explain_batch, or explain_matrix.
Use validation data that is separate from the final reporting split. Record selection.rows with your experiment artifacts.
FPDEEngine.grid_search compares Diff-FPDE, Cos-FPDE, and Hyb-FPDE settings.
Supported objectives are:

Compute perturbation curves

Use perturbation_curves when you want deletion and insertion metrics for one attribution vector.
Features are ranked by signed positive attribution in descending order. Deletion replaces top-ranked features with the baseline. Insertion starts from the baseline and restores top-ranked features.

Practical checks

  • Confirm that predict_proba returns at least two class columns.
  • Confirm that model.classes_ matches the labels used to fit FPDE prototypes.
  • Apply the same preprocessing pipeline to training, validation, and explanation data.
  • Check exactness_residual for numerical stability.
  • Save the grid, fractions, baseline, and selected lambda.