pub struct HardNegativeMiner {
pub strategy: MiningStrategy,
pub pos_neg_ratio: f64,
}Expand description
Hard negative mining for handling imbalanced datasets.
Focuses training on difficult negative examples to improve classifier discrimination.
§References
- Shrivastava et al. (2016): “Training Region-based Object Detectors with Online Hard Example Mining”
Fields§
§strategy: MiningStrategyMining strategy to use
pos_neg_ratio: f64Ratio of positives to negatives to maintain
Implementations§
Source§impl HardNegativeMiner
impl HardNegativeMiner
Sourcepub fn new(strategy: MiningStrategy, pos_neg_ratio: f64) -> Self
pub fn new(strategy: MiningStrategy, pos_neg_ratio: f64) -> Self
Create a new hard negative miner.
Trait Implementations§
Source§impl Clone for HardNegativeMiner
impl Clone for HardNegativeMiner
Source§fn clone(&self) -> HardNegativeMiner
fn clone(&self) -> HardNegativeMiner
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 moreAuto Trait Implementations§
impl Freeze for HardNegativeMiner
impl RefUnwindSafe for HardNegativeMiner
impl Send for HardNegativeMiner
impl Sync for HardNegativeMiner
impl Unpin for HardNegativeMiner
impl UnwindSafe for HardNegativeMiner
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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