pub struct LinearModel {
pub bias: f32,
pub w_ignore_policy: f32,
pub w_dan: f32,
pub w_role_change: f32,
pub w_prompt_extraction: f32,
pub w_encoded: f32,
pub w_developer_mode: f32,
pub w_punct: f32,
pub w_symbol_run: f32,
pub w_low_shingle_uniqueness: f32,
pub w_zero_width: f32,
}Expand description
Weights for the lightweight linear “ML” model. Each input is a 0/1
feature flag except for the punctuation ratio (continuous) and shingle
uniqueness (continuous). The model applies a sigmoid so the output is
bounded in [0.0, 1.0].
Fields§
§bias: f32§w_ignore_policy: f32§w_dan: f32§w_role_change: f32§w_prompt_extraction: f32§w_encoded: f32§w_developer_mode: f32§w_punct: f32§w_symbol_run: f32§w_low_shingle_uniqueness: f32§w_zero_width: f32Trait Implementations§
Source§impl Clone for LinearModel
impl Clone for LinearModel
Source§fn clone(&self) -> LinearModel
fn clone(&self) -> LinearModel
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 LinearModel
impl Debug for LinearModel
Source§impl Default for LinearModel
impl Default for LinearModel
Source§impl<'de> Deserialize<'de> for LinearModel
impl<'de> Deserialize<'de> for LinearModel
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
Source§impl PartialEq for LinearModel
impl PartialEq for LinearModel
Source§impl Serialize for LinearModel
impl Serialize for LinearModel
impl Copy for LinearModel
impl StructuralPartialEq for LinearModel
Auto Trait Implementations§
impl Freeze for LinearModel
impl RefUnwindSafe for LinearModel
impl Send for LinearModel
impl Sync for LinearModel
impl Unpin for LinearModel
impl UnsafeUnpin for LinearModel
impl UnwindSafe for LinearModel
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