growingspheres/growingspheres.py
def ennemies_in_layer_(self, segment, caps=None, n=1000):
        """
        Basis for GS: generates a hypersphere layer, labels it with the blackbox and returns the instances that are predicted to belong to the target class.
        """
        layer = self.generate_inside_spheres(self.obs_to_interprete, segment, n)
        #cap here: not optimal
        if caps != None:
            cap_fn_ = lambda x: min(max(x, caps[0]), caps[1])
            layer = np.vectorize(cap_fn_)(layer)

        preds_ = self.prediction_fn(layer)
        return layer[np.where(preds_ == self.target_class)]

        Basis for GS: generates a hypersphere layer, labels it with the blackbox and returns the instances that are predicted to belong to the target class.
        
Basis for GS: generates a hypersphere layer, labels it with the blackbox and returns the instances that are predicted to belong to the target class.
Basis for GS : generates a hypersphere layer labels it with the blackbox and returns the instances that are predicted to belong to the target class .
def ennemies_in_layer_(self, segment, caps=None, n=1000):
        layer = self.generate_inside_spheres(self.obs_to_interprete, segment, n)
        if caps != None:
            cap_fn_ = lambda x: min(max(x, caps[0]), caps[1])
            layer = np.vectorize(cap_fn_)(layer)
        preds_ = self.prediction_fn(layer)
        return layer[np.where(preds_ == self.target_class)]
def ennemies_in_layer_ ( self , segment , caps = None , n = 1000 ) : layer = self . generate_inside_spheres ( self . obs_to_interprete , segment , n ) if caps != None : cap_fn_ = lambda x : min ( max ( x , caps [ 0 ] ) , caps [ 1 ] ) layer = np . vectorize ( cap_fn_ ) ( layer ) preds_ = self . prediction_fn ( layer ) return layer [ np . where ( preds_ == self . target_class ) ]
Basis for GS: generates a hypersphere layer, labels it with the blackbox and returns the instances that are predicted to belong to the target class.
Basis for GS : generates a hypersphere layer labels it with the blackbox and returns the instances that are predicted to belong to the target class .
"""
        Basis for GS: generates a hypersphere layer, labels it with the blackbox and returns the instances that are predicted to belong to the target class.
        """ #cap here: not optimal
self
segment
caps
n