shapiq.explainer.utils#

Functions

get_explainers()

get_predict_function_and_model_type(model, ...)

predict_callable(m, d)

predict_default(m, d)

predict_proba_default(m, d)

predict_tf_binary(m, d)

predict_tf_first(m, d)

predict_tf_single(m, d)

predict_xgboost(m, d)

print_class(obj)

Converts a class or class type into a user-readable class name.

print_classes_nicely(obj)

Converts a list of classes into user-readable class names.

shapiq.explainer.utils.get_explainers()[source]#
shapiq.explainer.utils.get_predict_function_and_model_type(model, model_class)[source]#
shapiq.explainer.utils.predict_callable(m, d)[source]#
shapiq.explainer.utils.predict_default(m, d)[source]#
shapiq.explainer.utils.predict_proba_default(m, d)[source]#
shapiq.explainer.utils.predict_tf_binary(m, d)[source]#
shapiq.explainer.utils.predict_tf_first(m, d)[source]#
shapiq.explainer.utils.predict_tf_single(m, d)[source]#
shapiq.explainer.utils.predict_xgboost(m, d)[source]#
shapiq.explainer.utils.print_class(obj)[source]#

Converts a class or class type into a user-readable class name. I/O examples: sklearn.ensemble._forest.RandomForestRegressor -> ‘sklearn.ensemble._forest.RandomForestRegressor’ type(sklearn.ensemble._forest.RandomForestRegressor) -> ‘sklearn.ensemble._forest.RandomForestRegressor’ shapiq.explainer.tree.explainer.TreeExplainer -> ‘shapiq.explainer.tree.explainer.TreeExplainer’ shapiq.TreeExplainer -> ‘shapiq.explainer.tree.explainer.TreeExplainer’ type(shapiq.TreeExplainer) -> ‘shapiq.explainer.tree.explainer.TreeExplainer’

shapiq.explainer.utils.print_classes_nicely(obj)[source]#

Converts a list of classes into user-readable class names. I/O examples: [shapiq.explainer._base.Explainer] -> [‘shapiq.Explainer’] {‘tree’: shapiq.explainer.tree.explainer.TreeExplainer} -> [‘shapiq.TreeExplainer’] {‘tree’: shapiq.TreeExplainer} -> [‘shapiq.TreeExplainer’]