pub struct BugPredictor { /* private fields */ }Expand description
Heuristic bug prediction model (legacy)
Simple heuristic-based bug predictor. For production use, prefer
AprenderBugPredictor which uses trained RandomForest models.
This implementation uses hand-crafted rules and doesn’t require training.
Implementations§
Source§impl BugPredictor
impl BugPredictor
Sourcepub fn predict(&self, features: &CodeFeatures) -> f32
pub fn predict(&self, features: &CodeFeatures) -> f32
Predict probability of a bug using heuristics
Returns probability in range [0, 1]
For ML-based prediction, use AprenderBugPredictor::train instead.
Trait Implementations§
Source§impl Debug for BugPredictor
impl Debug for BugPredictor
Source§impl Default for BugPredictor
impl Default for BugPredictor
Source§fn default() -> BugPredictor
fn default() -> BugPredictor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BugPredictor
impl RefUnwindSafe for BugPredictor
impl Send for BugPredictor
impl Sync for BugPredictor
impl Unpin for BugPredictor
impl UnsafeUnpin for BugPredictor
impl UnwindSafe for BugPredictor
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> 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 more