growingspheres/growingspheres.py
def exploration(self):
        """
        Exploration of the feature space to find the decision boundary. Generation of instances in growing hyperspherical layers.
        """
        n_ennemies_ = 999
        radius_ = self.first_radius
        
        while n_ennemies_ > 0:
            first_layer_ = self.ennemies_in_layer_((0, radius_), self.caps, self.n_in_layer)
            n_ennemies_ = first_layer_.shape[0]
            radius_ = radius_ / self.dicrease_radius
            if self.verbose == True:
                print("%d ennemies found in initial sphere. Zooming in..."%n_ennemies_)
            
        else:
            if self.verbose == True:
                print("Exploring...")
            iteration = 0
            step_ = (self.dicrease_radius - 1) * radius_/5.0
            
            while n_ennemies_ <= 0:
                layer = self.ennemies_in_layer_((radius_, radius_ + step_), self.caps, self.n_in_layer)
                n_ennemies_ = layer.shape[0]
                radius_ = radius_ + step_
                iteration += 1
            if self.verbose == True:
                print("Final number of iterations: ", iteration)
        if self.verbose == True:
            print("Final radius: ", (radius_ - step_, radius_))
            print("Final number of ennemies: ", n_ennemies_)
        return layer, radius_

        Exploration of the feature space to find the decision boundary. Generation of instances in growing hyperspherical layers.
        
Exploration of the feature space to find the decision boundary. Generation of instances in growing hyperspherical layers.
Exploration of the feature space to find the decision boundary . Generation of instances in growing hyperspherical layers .
def exploration(self):
        n_ennemies_ = 999
        radius_ = self.first_radius
        while n_ennemies_ > 0:
            first_layer_ = self.ennemies_in_layer_((0, radius_), self.caps, self.n_in_layer)
            n_ennemies_ = first_layer_.shape[0]
            radius_ = radius_ / self.dicrease_radius
            if self.verbose == True:
                print("%d ennemies found in initial sphere. Zooming in..."%n_ennemies_)
        else:
            if self.verbose == True:
                print("Exploring...")
            iteration = 0
            step_ = (self.dicrease_radius - 1) * radius_/5.0
            while n_ennemies_ <= 0:
                layer = self.ennemies_in_layer_((radius_, radius_ + step_), self.caps, self.n_in_layer)
                n_ennemies_ = layer.shape[0]
                radius_ = radius_ + step_
                iteration += 1
            if self.verbose == True:
                print("Final number of iterations: ", iteration)
        if self.verbose == True:
            print("Final radius: ", (radius_ - step_, radius_))
            print("Final number of ennemies: ", n_ennemies_)
        return layer, radius_
def exploration ( self ) : n_ennemies_ = 999 radius_ = self . first_radius while n_ennemies_ > 0 : first_layer_ = self . ennemies_in_layer_ ( ( 0 , radius_ ) , self . caps , self . n_in_layer ) n_ennemies_ = first_layer_ . shape [ 0 ] radius_ = radius_ / self . dicrease_radius if self . verbose == True : print ( "%d ennemies found in initial sphere. Zooming in..." % n_ennemies_ ) else : if self . verbose == True : print ( "Exploring..." ) iteration = 0 step_ = ( self . dicrease_radius - 1 ) * radius_ / 5.0 while n_ennemies_ <= 0 : layer = self . ennemies_in_layer_ ( ( radius_ , radius_ + step_ ) , self . caps , self . n_in_layer ) n_ennemies_ = layer . shape [ 0 ] radius_ = radius_ + step_ iteration += 1 if self . verbose == True : print ( "Final number of iterations: " , iteration ) if self . verbose == True : print ( "Final radius: " , ( radius_ - step_ , radius_ ) ) print ( "Final number of ennemies: " , n_ennemies_ ) return layer , radius_
Exploration of the feature space to find the decision boundary.
Exploration of the feature space to find the decision boundary .
"""
        Exploration of the feature space to find the decision boundary. Generation of instances in growing hyperspherical layers.
        """
self