Skip to main content

Classifier

Struct Classifier 

Source
pub struct Classifier {
Show 17 fields pub classifier_id: String, pub name: String, pub parent_region_id: String, pub coordinates_3d: [i32; 3], pub sample_area_ids: Vec<String>, pub class_bindings: Vec<ClassifierClassBinding>, pub sample_memory_id: String, pub class_memory_id: String, pub error_area_id: String, pub reward_training: bool, pub answer_feedback_area_id: Option<String>, pub pain_area_id: Option<String>, pub pleasure_area_id: Option<String>, pub answer_latency_bursts: u32, pub learn_area_id: Option<String>, pub confidence_area_id: Option<String>, pub properties: HashMap<String, Value>,
}
Expand description

First-class classifier record persisted in the genome.

Fields§

§classifier_id: String

UUID string, genome map key.

§name: String§parent_region_id: String

Circuit region that contains this assembly.

That region is a child of the region the user added the classifier to, and that parent may be root. The memory and error areas belong to this circuit, not to root.

§coordinates_3d: [i32; 3]§sample_area_ids: Vec<String>

Episodic sample inputs on the sample memory. Order is not significant.

§class_bindings: Vec<ClassifierClassBinding>

Episodic class inputs and the output created for each one.

§sample_memory_id: String

Owned sample memory. Deleting it deletes the classifier.

§class_memory_id: String

Owned class memory. Deleting it deletes the classifier.

§error_area_id: String

Owned 1x1x1 area. Fires when any class output mismatches its class input or has more than one firing neuron.

§reward_training: bool

Per-pattern pain and pleasure on the associative mapping.

§answer_feedback_area_id: Option<String>

Correct-answer area. Empty until the user selects one.

§pain_area_id: Option<String>

Hidden area whose firing is this classifier’s pain signal.

§pleasure_area_id: Option<String>

Hidden area whose firing is this classifier’s pleasure signal.

§answer_latency_bursts: u32

Bursts between a decision and the answer that grades it. Zero grades the same burst.

§learn_area_id: Option<String>

When set, pain and pleasure run only on bursts this area fires.

§confidence_area_id: Option<String>

OPU that receives one surplus value per class channel.

§properties: HashMap<String, Value>

Implementations§

Source§

impl Classifier

Source

pub fn assembly_core_ids(&self) -> Vec<String>

Sample memory and class memory. Deleting either deletes the assembly.

Source

pub fn owned_area_ids(&self) -> Vec<String>

Owned internals deleted with the classifier.

Source

pub fn input_area_ids(&self) -> Vec<String>

Referenced input areas that may be cleared independently.

Source

pub fn owns_assembly_core(&self, area_id: &str) -> bool

Source

pub fn owns_area(&self, area_id: &str) -> bool

True when area_id is sample memory, class memory, the error area, or a class output.

Source

pub fn binding_for_class( &self, class_area_id: &str, ) -> Option<&ClassifierClassBinding>

Source

pub fn binding_for_output( &self, output_area_id: &str, ) -> Option<&ClassifierClassBinding>

Source

pub fn references_input(&self, area_id: &str) -> bool

True when area_id is a referenced sample or class input of this classifier.

Source

pub fn apply_metadata_update( &mut self, name: Option<String>, coordinates_3d: Option<[i32; 3]>, ) -> Result<(), String>

Apply classifier-level metadata. Does not change owned internals or inputs.

Source

pub fn apply_assembly_update( &mut self, name: Option<String>, coordinates_3d: Option<[i32; 3]>, parent_region_id: Option<String>, ) -> Result<(), String>

Apply classifier-level edit. Does not replace owned internals or input bindings.

Source

pub fn required_mappings(&self) -> Vec<ClassifierMapping>

Mappings this classifier requires given its current inputs.

Source

pub fn clear_input(&mut self, area_id: &str) -> Option<String>

Drop an input reference when that area is deleted.

Returns the class output id that must be deleted with a removed class input.

Source

pub fn attach_sample(&mut self, sample_area_id: String) -> Result<(), String>

Record one sample input. A second call for the same area is a no-op success.

Source

pub fn detach_sample(&mut self, sample_area_id: &str) -> bool

Remove one sample input.

Source

pub fn attach_class( &mut self, class_area_id: String, class_output_area_id: String, ) -> Result<(), String>

Record one class input and its output. The output id may be filled after the area exists.

Source

pub fn set_class_output( &mut self, class_area_id: &str, class_output_area_id: String, ) -> Result<(), String>

Fill the output id for a class input that was recorded before the area existed.

Source

pub fn detach_class(&mut self, class_area_id: &str) -> Option<String>

Remove one class binding. Returns the output area id when one was recorded.

Source

pub fn apply_mapping_change( &mut self, src_area_id: &str, dst_area_id: &str, morphology_id: &str, removed: bool, ) -> Result<ClassifierMappingEffect, String>

Bind or clear sample and class inputs from a mapping change.

applied is false when the edge does not belong to this classifier. removed_output_id is set when a class input mapping is removed.

Trait Implementations§

Source§

impl Clone for Classifier

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Classifier

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Classifier

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Classifier

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Classifier

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Classifier

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.