pub struct ContinualLearningMemory {
pub associative_memory: HashMap<String, Hypervector>,
pub episodic_buffer: VecDeque<Experience>,
pub consolidated_memory: HashMap<String, Hypervector>,
pub config: HDCConfig,
pub buffer_capacity: usize,
pub interference_threshold: f64,
}Expand description
Continual Learning Memory with interference prevention
Fields§
§associative_memory: HashMap<String, Hypervector>Main associative memory
episodic_buffer: VecDeque<Experience>Episodic buffer for recent experiences
consolidated_memory: HashMap<String, Hypervector>Long-term consolidated memories
config: HDCConfigConfiguration parameters
buffer_capacity: usizeMaximum size of episodic buffer
interference_threshold: f64Interference threshold
Implementations§
Source§impl ContinualLearningMemory
impl ContinualLearningMemory
Sourcepub fn add_experience(
&mut self,
experience: Experience,
_consolidation: &ConsolidationResult,
) -> NdimageResult<()>
pub fn add_experience( &mut self, experience: Experience, _consolidation: &ConsolidationResult, ) -> NdimageResult<()>
Add a new experience with consolidation
§Arguments
experience- New experience to addconsolidation- Consolidation result information
Sourcepub fn calculate_interference(&self, new_encoding: &Hypervector) -> f64
pub fn calculate_interference(&self, new_encoding: &Hypervector) -> f64
Sourcepub fn retrieve(&self, query: &Hypervector) -> Option<(String, f64)>
pub fn retrieve(&self, query: &Hypervector) -> Option<(String, f64)>
Retrieve from memory with consolidation awareness
Sourcepub fn get_memory_stats(&self) -> (usize, usize, usize)
pub fn get_memory_stats(&self) -> (usize, usize, usize)
Get memory statistics
Sourcepub fn get_current_time(&self) -> usize
pub fn get_current_time(&self) -> usize
Get current timestamp
Sourcepub fn update_meta_learning_parameters(
&mut self,
_stats: &ContinualLearningStats,
)
pub fn update_meta_learning_parameters( &mut self, _stats: &ContinualLearningStats, )
Update meta-learning parameters (placeholder)
Sourcepub fn get_meta_learning_score(&self) -> f64
pub fn get_meta_learning_score(&self) -> f64
Get meta-learning score (placeholder)
Trait Implementations§
Source§impl Clone for ContinualLearningMemory
impl Clone for ContinualLearningMemory
Source§fn clone(&self) -> ContinualLearningMemory
fn clone(&self) -> ContinualLearningMemory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ContinualLearningMemory
impl RefUnwindSafe for ContinualLearningMemory
impl Send for ContinualLearningMemory
impl Sync for ContinualLearningMemory
impl Unpin for ContinualLearningMemory
impl UnsafeUnpin for ContinualLearningMemory
impl UnwindSafe for ContinualLearningMemory
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.