nirs4all.api.general_explain module
SHAP over a captured scientific predictor, without replaying a legacy runner.
- nirs4all.api.general_explain.explain_general(model: Any, data: Any, *, name: str, session: Any, verbose: int, plots_visible: bool, n_samples: int | None, explainer_type: str, options: dict[str, Any]) ExplainResult[source]
Reuse the library SHAP analyzer on the complete frozen raw-input predictor.
Preprocessing and target inverses stay inside the captured predictor. SHAP therefore explains original input columns and original target units, not a terminal estimator with an incorrectly labelled raw feature axis. Multi-output requests expose a labelled selected output, preserving the 2D ExplainResult.