Module epiclass.compute_shaps
Compute SHAP values of a model.
Functions
def compute_shap(cli: argparse.Namespace, shap_computer: NN_SHAP_Handler | LGBM_SHAP_Handler, output_name: str)-
Compute SHAP values for a given model.
Args
cli:argparse.Namespace- Parsed command-line arguments.
model:LightningDenseClassifierorEstimatorAnalyzer- Model to compute SHAP values for.
shap_computer:NN_SHAP_HandlerorLGBM_SHAP_Handler- SHAP computer instance.
output_name:str- Output name for the SHAP values.
background_required:bool, optional- Whether the background dataset is required. Defaults to False.
def main()-
main
def parse_arguments() ‑> argparse.Namespace-
Parse command-line arguments for the script.
Returns
argparse.Namespace- Namespace object with parsed arguments.