pub struct AprenderBugPredictor { /* private fields */ }Expand description
Trained bug prediction model using aprender RandomForest
Implementations§
Source§impl AprenderBugPredictor
impl AprenderBugPredictor
Sourcepub fn train(_features: &[CodeFeatures], _labels: &[bool]) -> Result<Self>
pub fn train(_features: &[CodeFeatures], _labels: &[bool]) -> Result<Self>
Train a new bug prediction model (no-op without ml feature)
§Errors
Always returns error without ‘ml’ feature enabled
Sourcepub fn predict(&self, _features: &CodeFeatures) -> f32
pub fn predict(&self, _features: &CodeFeatures) -> f32
Predict probability of a bug (fallback without ml feature)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AprenderBugPredictor
impl RefUnwindSafe for AprenderBugPredictor
impl Send for AprenderBugPredictor
impl Sync for AprenderBugPredictor
impl Unpin for AprenderBugPredictor
impl UnsafeUnpin for AprenderBugPredictor
impl UnwindSafe for AprenderBugPredictor
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