Neighborhood
Catalog of neighborhood functions.
Neighborhood functions are defined as equinox.Module parametrized functions
          AbstractNbh
  
            Bases: Module
Ensures that all neighborhood functions have the same signatures.
Source code in src/somap/neighborhood.py
              
          __call__(distance_map, t, quantization_error)
  
  
      abstractmethod
  
  SOM Neighborhood function.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
distance_map | 
          
                Float[Array, 'x y']
           | 
          
             Distance of each grid elements from the winning element.  | 
          required | 
t | 
          
                Integer[Array, '']
           | 
          
             Current iteration.  | 
          required | 
quantization_error | 
          
                Float[Array, '']
           | 
          
             The computed difference between the winner prototype and the input.  | 
          required | 
Returns:
| Type | Description | 
|---|---|
                Float[Array, 'x y']
           | 
          
             The neighborhood distance.  | 
        
Source code in src/somap/neighborhood.py
            
          DsomNbh
  
            Bases: AbstractNbh
Dynamic Kohonen neighborhood function.
Source code in src/somap/neighborhood.py
              
          __call__(distance_map, _, quantization_error)
  Computes the Dynamic SOM neighboring value of each grid element.
See
Nicolas P. Rougier, Yann Boniface. Dynamic Self-Organising Map. Neurocomputing, Elsevier, 2011, 74 (11), pp.1840-1847. ff10.1016/j.neucom.2010.06.034ff. ffinria-00495827
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
self | 
          
             self.plasticity: Dynamic value to compute the neighbourhood distance.  | 
          required | |
distance_map | 
          
                Float[Array, 'x y']
           | 
          
             Distance of each element from the winner element.  | 
          required | 
_ | 
          
             Not used  | 
          required | |
quantization_error | 
          
                Float[Array, '']
           | 
          
             The computed difference between the winner prototype and the input.  | 
          required | 
Returns:
| Type | Description | 
|---|---|
                Float[Array, 'x y']
           | 
          
             The neighborhood distance, as calculated in the article.  | 
        
Source code in src/somap/neighborhood.py
            
          GaussianNbh
  
            Bases: AbstractNbh
Exponentially decreasing neighborhood function.
Source code in src/somap/neighborhood.py
              
          __call__(distance_map, t, __)
  Return the Kohonen time-independent neighboring value of each element.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
self | 
          
             Module's parameters self.sigma: Neighbourhood distance.  | 
          required | |
distance_map | 
          
                Float[Array, 'x y']
           | 
          
             Distance of each element from the winner element.  | 
          required | 
t | 
          
             Not used  | 
          required | |
__ | 
          
             Not used  | 
          required | 
Returns:
| Type | Description | 
|---|---|
                Float[Array, 'x y']
           | 
          
             The kohonen neighborhood distance.  | 
        
Source code in src/somap/neighborhood.py
            
          KsomNbh
  
            Bases: AbstractNbh
Kohonen neighborhood function.
Source code in src/somap/neighborhood.py
              
          __call__(distance_map, t, _)
  Returns the Kohonen neighboring value of each element.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
self | 
          
             Module's parameters self.t_f: Aimed iteration. self.sigma_i: Current neighborhood distance. self.sigma_f: Aimed neighborhood distance.  | 
          required | |
distance_map | 
          
                Float[Array, 'x y']
           | 
          
             Distance of each grid elements from the winning element.  | 
          required | 
t | 
          
                Integer[Array, '']
           | 
          
             Current iteration.  | 
          required | 
_ | 
          
             Not used  | 
          required | 
Returns:
| Type | Description | 
|---|---|
                Float[Array, 'x y']
           | 
          
             The kohonen neighborhood distance.  | 
        
Source code in src/somap/neighborhood.py
            
          MexicanHatNbh
  
            Bases: AbstractNbh
Mexican Hat neighborhood function.
Source code in src/somap/neighborhood.py
              
          __call__(distance_map, _, __)
  Computes the Mexican Hat neighboring value of each grid element.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
self | 
          
             self.sigma: Scale factor for the spread of the neighborhood.  | 
          required | |
distance_map | 
          
                Float[Array, 'x y']
           | 
          
             Distance of each element from the winner element.  | 
          required | 
_ | 
          
             Not used  | 
          required | |
__ | 
          
             Not used  | 
          required | 
Returns:
| Type | Description | 
|---|---|
                Float[Array, 'x y']
           | 
          
             The Mexican Hat neighborhood distance.  |