pub enum MinSamples<F> {
Count(usize),
Fraction(F),
}Expand description
How min_samples (the per-trial subset size) is specified.
Mirrors scikit-learn’s min_samples parameter, which is int (>= 1) for an
absolute count or float ([0, 1]) for a relative fraction
(sklearn/linear_model/_ransac.py:115-125; constraint
Interval(Integral, 1, None) | Interval(RealNotInt, 0, 1, closed="both"),
_ransac.py:262-266). The resolution at fit time is:
0 < f < 1 → ceil(f · n_samples) (_ransac.py:389-390); an integer count is
used directly (_ransac.py:391-392). A resolved count larger than
n_samples is a ValueError (_ransac.py:393-397).
Variants§
Count(usize)
An absolute number of samples per subset (min_samples >= 1).
Fraction(F)
A fraction of n_samples per subset, resolved to
ceil(fraction · n_samples) (sklearn 0 < min_samples < 1).
Trait Implementations§
Source§impl<F: Clone> Clone for MinSamples<F>
impl<F: Clone> Clone for MinSamples<F>
Source§fn clone(&self) -> MinSamples<F>
fn clone(&self) -> MinSamples<F>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<F: Copy> Copy for MinSamples<F>
Source§impl<F: Debug> Debug for MinSamples<F>
impl<F: Debug> Debug for MinSamples<F>
Source§impl<F: PartialEq> PartialEq for MinSamples<F>
impl<F: PartialEq> PartialEq for MinSamples<F>
Source§fn eq(&self, other: &MinSamples<F>) -> bool
fn eq(&self, other: &MinSamples<F>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<F> StructuralPartialEq for MinSamples<F>
Auto Trait Implementations§
impl<F> Freeze for MinSamples<F>where
F: Freeze,
impl<F> RefUnwindSafe for MinSamples<F>where
F: RefUnwindSafe,
impl<F> Send for MinSamples<F>where
F: Send,
impl<F> Sync for MinSamples<F>where
F: Sync,
impl<F> Unpin for MinSamples<F>where
F: Unpin,
impl<F> UnsafeUnpin for MinSamples<F>where
F: UnsafeUnpin,
impl<F> UnwindSafe for MinSamples<F>where
F: UnwindSafe,
Blanket Implementations§
impl<T> Boilerplate for T
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> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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