Trait cerebral::selforganizing::Selforganizing
source · pub trait Selforganizing: Neural {
// Required methods
fn init_lateral(&mut self);
fn get_lateral_distance(&mut self, index: usize) -> Array2<f64>;
fn get_best_matching(&mut self, pattern: &ArrayView1<'_, f64>) -> usize;
fn adapt(
&mut self,
pattern: &ArrayView1<'_, f64>,
influence: f64,
rate: f64
);
fn train(&mut self, patterns: &ArrayView2<'_, f64>);
}
Expand description
Public trait that defines the concept of self organization
Required Methods§
sourcefn init_lateral(&mut self)
fn init_lateral(&mut self)
Init the lateral connections according to network type
sourcefn get_lateral_distance(&mut self, index: usize) -> Array2<f64>
fn get_lateral_distance(&mut self, index: usize) -> Array2<f64>
Get the distance/connection between a selected neuron and the rest of the layer
sourcefn get_best_matching(&mut self, pattern: &ArrayView1<'_, f64>) -> usize
fn get_best_matching(&mut self, pattern: &ArrayView1<'_, f64>) -> usize
Get the best matching neuron given a pattern
sourcefn adapt(&mut self, pattern: &ArrayView1<'_, f64>, influence: f64, rate: f64)
fn adapt(&mut self, pattern: &ArrayView1<'_, f64>, influence: f64, rate: f64)
Adapt the layer to an input pattern. Note this consumes the current later and returns a new created (zero-copy)