classification/tree_manager.py
def explain_sample(self, importance: float, months: int, index: int) -> None:
        """
        Explain a sample from the test set.
        :param importance: importance of the Fail class. Used as a multiplier for its class weight
        :param months: how many months of assessments are taken into account
        :param index: the index of the sample in the test set
        """
        tree = self.trees[importance][months]
        explainer = TreeExplainer(tree.model, tree.feature_names, tree.target_names)
        explainer.print_path_and_foil(tree.x_test.iloc[[index]])

        Explain a sample from the test set.
        :param importance: importance of the Fail class. Used as a multiplier for its class weight
        :param months: how many months of assessments are taken into account
        :param index: the index of the sample in the test set
        
Explain a sample from the test set.
Explain a sample from the test set .
def explain_sample(self, importance: float, months: int, index: int) -> None:
        tree = self.trees[importance][months]
        explainer = TreeExplainer(tree.model, tree.feature_names, tree.target_names)
        explainer.print_path_and_foil(tree.x_test.iloc[[index]])
def explain_sample ( self , importance : float , months : int , index : int ) -> None : tree = self . trees [ importance ] [ months ] explainer = TreeExplainer ( tree . model , tree . feature_names , tree . target_names ) explainer . print_path_and_foil ( tree . x_test . iloc [ [ index ] ] )
Explain a sample from the test set.
Explain a sample from the test set .
"""
        Explain a sample from the test set.
        :param importance: importance of the Fail class. Used as a multiplier for its class weight
        :param months: how many months of assessments are taken into account
        :param index: the index of the sample in the test set
        """
self
importance
float
importance of the Fail class. Used as a multiplier for its class weight
importance of the Fail class . Used as a multiplier for its class weight
months
int
None
index
int
the index of the sample in the test set
the index of the sample in the test set