Struct criterion_stats::univariate::outliers::tukey::LabeledSample [−][src]
A classified/labeled sample.
The labeled data can be accessed using the indexing operator. The order of the data points is retained.
NOTE: Due to limitations in the indexing traits, only the label is returned. Once the
IndexGet
trait lands in stdlib, the indexing operation will return a (data_point, label)
pair.
Implementations
impl<'a, A> LabeledSample<'a, A> where
A: Float,
[src]
A: Float,
pub fn count(&self) -> (usize, usize, usize, usize, usize)
[src]
Returns the number of data points per label
- Time:
O(length)
pub fn fences(&self) -> (A, A, A, A)
[src]
Returns the fences used to classify the outliers
pub fn iter(&self) -> Iter<'a, A>ⓘ
[src]
Returns an iterator over the labeled data
Methods from Deref<Target = Sample<A>>
pub fn max(&self) -> A
[src]
Returns the biggest element in the sample
- Time:
O(length)
pub fn mean(&self) -> A
[src]
Returns the arithmetic average of the sample
- Time:
O(length)
pub fn median_abs_dev(&self, median: Option<A>) -> A where
usize: From<A, Output = Result<usize, Error>>,
[src]
usize: From<A, Output = Result<usize, Error>>,
Returns the median absolute deviation
The median
can be optionally passed along to speed up (2X) the computation
- Time:
O(length)
- Memory:
O(length)
pub fn median_abs_dev_pct(&self) -> A where
usize: From<A, Output = Result<usize, Error>>,
[src]
usize: From<A, Output = Result<usize, Error>>,
Returns the median absolute deviation as a percentage of the median
- Time:
O(length)
- Memory:
O(length)
pub fn min(&self) -> A
[src]
Returns the smallest element in the sample
- Time:
O(length)
pub fn percentiles(&self) -> Percentiles<A> where
usize: From<A, Output = Result<usize, Error>>,
[src]
usize: From<A, Output = Result<usize, Error>>,
Returns a “view” into the percentiles of the sample
This “view” makes consecutive computations of percentiles much faster (O(1)
)
- Time:
O(N log N) where N = length
- Memory:
O(length)
pub fn std_dev(&self, mean: Option<A>) -> A
[src]
Returns the standard deviation of the sample
The mean
can be optionally passed along to speed up (2X) the computation
- Time:
O(length)
pub fn std_dev_pct(&self) -> A
[src]
Returns the standard deviation as a percentage of the mean
- Time:
O(length)
pub fn sum(&self) -> A
[src]
Returns the sum of all the elements of the sample
- Time:
O(length)
pub fn t(&self, other: &Sample<A>) -> A
[src]
Returns the t score between these two samples
- Time:
O(length)
pub fn var(&self, mean: Option<A>) -> A
[src]
Returns the variance of the sample
The mean
can be optionally passed along to speed up (2X) the computation
- Time:
O(length)
pub fn bootstrap<T, S>(
&self,
nresamples: usize,
statistic: S
) -> T::Distributions where
S: Fn(&Sample<A>) -> T,
S: Sync,
T: Tuple,
T: Send,
T::Distributions: Send,
T::Builder: Send,
[src]
&self,
nresamples: usize,
statistic: S
) -> T::Distributions where
S: Fn(&Sample<A>) -> T,
S: Sync,
T: Tuple,
T: Send,
T::Distributions: Send,
T::Builder: Send,
Returns the bootstrap distributions of the parameters estimated by the 1-sample statistic
- Multi-threaded
- Time:
O(nresamples)
- Memory:
O(nresamples)
Trait Implementations
impl<'a, A: Clone> Clone for LabeledSample<'a, A> where
A: 'a + Float,
[src]
A: 'a + Float,
fn clone(&self) -> LabeledSample<'a, A>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a, A: Copy> Copy for LabeledSample<'a, A> where
A: 'a + Float,
[src]
A: 'a + Float,
impl<'a, A> Deref for LabeledSample<'a, A> where
A: Float,
[src]
A: Float,
impl<'a, A> Index<usize> for LabeledSample<'a, A> where
A: Float,
[src]
A: Float,
impl<'a, 'b, A> IntoIterator for &'b LabeledSample<'a, A> where
A: Float,
[src]
A: Float,
Auto Trait Implementations
impl<'a, A> RefUnwindSafe for LabeledSample<'a, A> where
A: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, A> Send for LabeledSample<'a, A>
impl<'a, A> Sync for LabeledSample<'a, A>
impl<'a, A> Unpin for LabeledSample<'a, A> where
A: Unpin,
A: Unpin,
impl<'a, A> UnwindSafe for LabeledSample<'a, A> where
A: RefUnwindSafe + UnwindSafe,
A: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,