pub struct RuleBasedClassifier { /* private fields */ }Expand description
Rule-based baseline classifier.
Uses deterministic rules based on feature patterns:
malloc + free→Ownedmalloc + size_param + array_decay→Vecconst→Borrowedwrite_count > 0→BorrowedMutarray_decay + size_param→Slice
Implementations§
Source§impl RuleBasedClassifier
impl RuleBasedClassifier
Sourcepub fn with_weights(weights: RuleWeights) -> Self
pub fn with_weights(weights: RuleWeights) -> Self
Create with custom weights.
Trait Implementations§
Source§impl Clone for RuleBasedClassifier
impl Clone for RuleBasedClassifier
Source§fn clone(&self) -> RuleBasedClassifier
fn clone(&self) -> RuleBasedClassifier
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 RuleBasedClassifier
impl Debug for RuleBasedClassifier
Source§impl Default for RuleBasedClassifier
impl Default for RuleBasedClassifier
Source§fn default() -> RuleBasedClassifier
fn default() -> RuleBasedClassifier
Returns the “default value” for a type. Read more
Source§impl OwnershipClassifier for RuleBasedClassifier
impl OwnershipClassifier for RuleBasedClassifier
Source§fn classify(&self, features: &OwnershipFeatures) -> ClassifierPrediction
fn classify(&self, features: &OwnershipFeatures) -> ClassifierPrediction
Classify a feature vector.
Source§fn is_trained(&self) -> bool
fn is_trained(&self) -> bool
Check if classifier is trained.
Source§fn classify_batch(
&self,
features: &[OwnershipFeatures],
) -> Vec<ClassifierPrediction>
fn classify_batch( &self, features: &[OwnershipFeatures], ) -> Vec<ClassifierPrediction>
Classify multiple samples (batch prediction).
Auto Trait Implementations§
impl Freeze for RuleBasedClassifier
impl RefUnwindSafe for RuleBasedClassifier
impl Send for RuleBasedClassifier
impl Sync for RuleBasedClassifier
impl Unpin for RuleBasedClassifier
impl UnwindSafe for RuleBasedClassifier
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