pub struct TaskPrototype {
pub tokens: HashSet<String>,
pub offsets: HashMap<ActionKey, f64>,
pub avg_reward: f64,
pub match_count: usize,
}Expand description
A stored snapshot of a completed task episode used as a meta-learning prototype.
Fields§
§tokens: HashSet<String>Lowercase token set of the task goal.
offsets: HashMap<ActionKey, f64>Per-action Q-value offsets learned during this episode.
avg_reward: f64Average reward achieved during the episode.
match_count: usizeNumber of times this prototype has been matched and applied.
Implementations§
Source§impl TaskPrototype
impl TaskPrototype
Sourcepub fn similarity(&self, other: &HashSet<String>) -> f64
pub fn similarity(&self, other: &HashSet<String>) -> f64
Computes Jaccard similarity between this prototype and a query token set.
Returns a value in [0, 1] where 1.0 = exact token-set match.
Trait Implementations§
Source§impl Clone for TaskPrototype
impl Clone for TaskPrototype
Source§fn clone(&self) -> TaskPrototype
fn clone(&self) -> TaskPrototype
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 moreSource§impl Debug for TaskPrototype
impl Debug for TaskPrototype
Source§impl<'de> Deserialize<'de> for TaskPrototype
impl<'de> Deserialize<'de> for TaskPrototype
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskPrototype
impl RefUnwindSafe for TaskPrototype
impl Send for TaskPrototype
impl Sync for TaskPrototype
impl Unpin for TaskPrototype
impl UnsafeUnpin for TaskPrototype
impl UnwindSafe for TaskPrototype
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