get_feature_specs: Gets the feature specifications form the model

View source: R/get_feature_specs.R

get_feature_specsR Documentation

Gets the feature specifications form the model

Description

Gets the feature specifications form the model

Usage

get_feature_specs(get_model_specs, model)

Arguments

get_model_specs

Function. An optional function for checking model/data consistency when model is not natively supported. (Run get_supported_models() for a list of natively supported models.) The function takes model as argument and provides a list with 3 elements:

labels

Character vector with the names of each feature.

classes

Character vector with the classes of each features.

factor_levels

Character vector with the levels for any categorical features.

If NULL (the default) internal functions are used for natively supported model classes, and the checking is disabled for unsupported model classes. Can also be used to override the default function for natively supported model classes.

model

Model object. Specifies the model whose predictions we want to explain. Run get_supported_models() for a table of which models explain supports natively. Unsupported models can still be explained by passing predict_model and (optionally) get_model_specs, see details for more information.


shapr documentation built on April 4, 2025, 12:18 a.m.