tabensemb.model.WideDeep.cal_feature_importance#

method

WideDeep.cal_feature_importance(model_name, method, indices: Iterable | None = None, **kwargs) Tuple[ndarray, List[str]]#

Calculate feature importance using a specified model.

Parameters:
model_name

The selected model in the model base.

method

The method to calculate importance. “permutation” or “shap”.

indices

The indices of data points where feature importance values are evaluated

kwargs

Arguments for cal_shap().

Returns:
np.ndarray

Values of feature importance.

list

Corresponding feature names.