Skip to main content
Use FPDEEngine.explain_one when you want one attribution vector and the metadata behind it. This is the common path for local explanations.

Prerequisites

  • A training matrix X_train
  • Training labels y_train
  • One explanation vector x
  • A fitted classifier with predict_proba and classes_
Apply the same preprocessing to X_train and x.

Fit reusable FPDE state

FPDE builds one class-mean prototype per class. The engine stores those prototypes, labels, anchors, and the baseline vector.

Explain the sample

lambda_hyb controls the Hyb-FPDE mixture. A value of 1.0 uses the Diff-FPDE endpoint. A value of 0.0 uses the Cos-FPDE endpoint.

Read the details

Positive attribution values support the target class. Negative attribution values support the rival class.

Show the strongest features

Use the raw attribution values for evidence-scale reporting. Use normalized values only when you need a display scale.

Common next step

After you confirm one explanation, use Explain batches to explain evaluation or test samples with the same fitted engine.