Пример #1
0
    def __init__(self, forward_func: Callable) -> None:
        r"""
        Args:

            forward_func (callable): The forward function of the model or
                        any modification of it
        """
        Lime.__init__(
            self,
            forward_func,
            linear_regression_interpretable_model_trainer,
            kernel_shap_similarity_kernel,
        )
Пример #2
0
    def __init__(self, forward_func: Callable) -> None:
        r"""
        Args:

            forward_func (callable): The forward function of the model or
                        any modification of it
        """
        Lime.__init__(
            self,
            forward_func,
            SkLearnLinearRegression(),
            kernel_shap_similarity_kernel,
        )
Пример #3
0
    def __init__(self, forward_func: Callable) -> None:
        r"""
        Args:

            forward_func (callable): The forward function of the model or
                        any modification of it
        """
        Lime.__init__(
            self,
            forward_func,
            interpretable_model=SkLearnLinearRegression(),
            similarity_func=self.kernel_shap_similarity_kernel,
            perturb_func=self.kernel_shap_perturb_generator,
        )
        self.inf_weight = 1000000.0