pub struct AdvancedMemristiveLearning { /* private fields */ }Expand description
Advanced memristive learning system with synaptic plasticity and homeostasis
This system implements a comprehensive memristive computing framework with multiple types of plasticity, homeostatic regulation, and neuromodulation. It supports various memristive device types and advanced learning dynamics.
§Features
- Multiple memristive device types (TiO2, HfO2, Phase Change, etc.)
- Advanced plasticity mechanisms (STDP, homeostatic scaling, etc.)
- Homeostatic regulation for stable learning
- Metaplasticity for learning-to-learn capabilities
- Neuromodulation systems (dopamine, serotonin, etc.)
- Memory consolidation and forgetting protection
- Comprehensive learning history tracking
§Example
use scirs2_core::ndarray::{Array1, Array2};
use scirs2_spatial::neuromorphic::algorithms::AdvancedMemristiveLearning;
use scirs2_spatial::neuromorphic::MemristiveDeviceType;
let mut learning_system = AdvancedMemristiveLearning::new(4, 2, MemristiveDeviceType::TitaniumDioxide)
.with_forgetting_protection(true);
// Training data
let spatial_data = Array2::from_shape_vec((4, 4), vec![
0.0, 0.0, 1.0, 1.0,
1.0, 0.0, 0.0, 1.0,
0.0, 1.0, 1.0, 0.0,
1.0, 1.0, 0.0, 0.0
]).unwrap();
let targets = Array1::from_vec(vec![0.0, 1.0, 1.0, 0.0]);
// Train the system
let result = learning_system.train_spatial_data(&spatial_data.view(), &targets.view(), 50).await.unwrap();
println!("Final accuracy: {:.2}", result.training_metrics.last().unwrap().accuracy);Implementations§
Source§impl AdvancedMemristiveLearning
impl AdvancedMemristiveLearning
Sourcepub fn new(rows: usize, cols: usize, device_type: MemristiveDeviceType) -> Self
pub fn new(rows: usize, cols: usize, device_type: MemristiveDeviceType) -> Self
Sourcepub fn enable_plasticity(self, plasticity_type: PlasticityType) -> Self
pub fn enable_plasticity(self, plasticity_type: PlasticityType) -> Self
Sourcepub fn with_homeostatic_regulation(self, target_rates: Array1<f64>) -> Self
pub fn with_homeostatic_regulation(self, target_rates: Array1<f64>) -> Self
Sourcepub fn with_forgetting_protection(self, enabled: bool) -> Self
pub fn with_forgetting_protection(self, enabled: bool) -> Self
Enable catastrophic forgetting protection
§Arguments
enabled- Whether to enable forgetting protection mechanisms
Sourcepub async fn train_spatial_data(
&mut self,
spatial_data: &ArrayView2<'_, f64>,
target_outputs: &ArrayView1<'_, f64>,
epochs: usize,
) -> SpatialResult<TrainingResult>
pub async fn train_spatial_data( &mut self, spatial_data: &ArrayView2<'_, f64>, target_outputs: &ArrayView1<'_, f64>, epochs: usize, ) -> SpatialResult<TrainingResult>
Train on spatial data with advanced plasticity
Performs training using all enabled plasticity mechanisms, homeostatic regulation, and neuromodulation.
§Arguments
spatial_data- Input spatial data (n_samples × n_features)target_outputs- Target outputs for each sampleepochs- Number of training epochs
§Returns
Training results including final weights and learning history
Sourcepub fn crossbar_dimensions(&self) -> (usize, usize)
pub fn crossbar_dimensions(&self) -> (usize, usize)
Get crossbar dimensions
Sourcepub fn device_type(&self) -> &MemristiveDeviceType
pub fn device_type(&self) -> &MemristiveDeviceType
Get device type
Sourcepub fn conductances(&self) -> &Array2<f64>
pub fn conductances(&self) -> &Array2<f64>
Get current conductances
Sourcepub fn learning_history(&self) -> &LearningHistory
pub fn learning_history(&self) -> &LearningHistory
Get learning history
Trait Implementations§
Source§impl Clone for AdvancedMemristiveLearning
impl Clone for AdvancedMemristiveLearning
Source§fn clone(&self) -> AdvancedMemristiveLearning
fn clone(&self) -> AdvancedMemristiveLearning
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdvancedMemristiveLearning
impl RefUnwindSafe for AdvancedMemristiveLearning
impl Send for AdvancedMemristiveLearning
impl Sync for AdvancedMemristiveLearning
impl Unpin for AdvancedMemristiveLearning
impl UnwindSafe for AdvancedMemristiveLearning
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.