classification/tree_explainer.py
def _print_comparison(self, decisions_sample: List[Decision], decisions_foil: List[Decision],
                          sample: DataFrame) -> None:
        """
        Prints the results of the comparison.
        """
        print("Contrastive rules:")
        for decision in decisions_foil:
            verdict = decision.str_apply(sample.iloc[0][decision.feature_name])
            if verdict is None:
                continue
            print(verdict)

        if decisions_sample:
            print("")
            print("Additional rules used to come to the verdict of the sample:")
            for decision in decisions_sample:
                print(decision)

        Prints the results of the comparison.
        
Prints the results of the comparison.
Prints the results of the comparison .
def _print_comparison(self, decisions_sample: List[Decision], decisions_foil: List[Decision],
                          sample: DataFrame) -> None:
        print("Contrastive rules:")
        for decision in decisions_foil:
            verdict = decision.str_apply(sample.iloc[0][decision.feature_name])
            if verdict is None:
                continue
            print(verdict)
        if decisions_sample:
            print("")
            print("Additional rules used to come to the verdict of the sample:")
            for decision in decisions_sample:
                print(decision)
def _print_comparison ( self , decisions_sample : List [ Decision ] , decisions_foil : List [ Decision ] , sample : DataFrame ) -> None : print ( "Contrastive rules:" ) for decision in decisions_foil : verdict = decision . str_apply ( sample . iloc [ 0 ] [ decision . feature_name ] ) if verdict is None : continue print ( verdict ) if decisions_sample : print ( "" ) print ( "Additional rules used to come to the verdict of the sample:" ) for decision in decisions_sample : print ( decision )
Prints the results of the comparison.
Prints the results of the comparison .
"""
        Prints the results of the comparison.
        """
self
decisions_sample
List[Decision]
decisions_foil
List[Decision]
sample
DataFrame