Validate a SHAP table Ensure that the input SHAP table is a data.table with at least one row and one numeric column. Optionally check for missing values and trigger an error any are found.
Source:R/assert_data_table_available.R
dot-validate_shap_table.RdValidate a SHAP table Ensure that the input SHAP table is a data.table with at least one row and one numeric column. Optionally check for missing values and trigger an error any are found.
Details
This function is used internally to ensure that SHAP tables are in a consistent format with appropriate types before decomposition. It checks that the input is a data.table (or coercible to one), contains at least one row and one column, that all columns are numeric, and optionally that there are no missing values.