growingspheres/growingspheres.py
def find_counterfactual(self):
        """
        Finds the decision border then perform projections to make the explanation sparse.
        """
        ennemies_, radius = self.exploration()
        ennemies = sorted(ennemies_, 
                                 key= lambda x: pairwise_distances(self.obs_to_interprete.reshape(1, -1), x.reshape(1, -1)))
        self.e_star = ennemies[0]
        if self.sparse == True:
            out = self.feature_selection(ennemies[0])
        else:
            out = ennemies[0]
        print("I AM IN GS")
        return out, ennemies, radius

        Finds the decision border then perform projections to make the explanation sparse.
        
Finds the decision border then perform projections to make the explanation sparse.
Finds the decision border then perform projections to make the explanation sparse .
def find_counterfactual(self):
        ennemies_, radius = self.exploration()
        ennemies = sorted(ennemies_, 
                                 key= lambda x: pairwise_distances(self.obs_to_interprete.reshape(1, -1), x.reshape(1, -1)))
        self.e_star = ennemies[0]
        if self.sparse == True:
            out = self.feature_selection(ennemies[0])
        else:
            out = ennemies[0]
        print("I AM IN GS")
        return out, ennemies, radius
def find_counterfactual ( self ) : ennemies_ , radius = self . exploration ( ) ennemies = sorted ( ennemies_ , key = lambda x : pairwise_distances ( self . obs_to_interprete . reshape ( 1 , - 1 ) , x . reshape ( 1 , - 1 ) ) ) self . e_star = ennemies [ 0 ] if self . sparse == True : out = self . feature_selection ( ennemies [ 0 ] ) else : out = ennemies [ 0 ] print ( "I AM IN GS" ) return out , ennemies , radius
Finds the decision border then perform projections to make the explanation sparse.
Finds the decision border then perform projections to make the explanation sparse .
"""
        Finds the decision border then perform projections to make the explanation sparse.
        """
self