Struct criterion_stats::univariate::outliers::tukey::LabeledSample [−][src]
pub struct LabeledSample<'a, A> where
A: 'a + Float, { /* fields omitted */ }
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.
Methods
impl<'a, A> LabeledSample<'a, A> where
A: Float,
[src]
impl<'a, A> LabeledSample<'a, A> where
A: Float,
pub fn count(&self) -> (usize, usize, usize, usize, usize)
[src]
pub fn count(&self) -> (usize, usize, usize, usize, usize)
Returns the number of data points per label
- Time:
O(length)
pub fn fences(&self) -> (A, A, A, A)
[src]
pub fn fences(&self) -> (A, A, A, A)
Returns the fences used to classify the outliers
ⓘImportant traits for Iter<'a, A>pub fn iter(&self) -> Iter<'a, A>
[src]
pub fn iter(&self) -> Iter<'a, A>
Returns an iterator over the labeled data
Methods from Deref<Target = Sample<A>>
pub fn as_slice(&self) -> &[A]
[src]
pub fn as_slice(&self) -> &[A]
Returns a slice that contains all the data points
NOTE: This will be removed in favor of a Deref<Target=[A]>
implementation once
rust-lang/rust#22257 is fixed.
pub fn max(&self) -> A
[src]
pub fn max(&self) -> A
Returns the biggest element in the sample
- Time:
O(length)
pub fn mean(&self) -> A
[src]
pub fn mean(&self) -> A
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]
pub fn median_abs_dev(&self, median: Option<A>) -> A where
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]
pub fn median_abs_dev_pct(&self) -> A where
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]
pub fn min(&self) -> A
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]
pub fn percentiles(&self) -> Percentiles<A> where
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]
pub fn std_dev(&self, mean: Option<A>) -> A
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]
pub fn std_dev_pct(&self) -> A
Returns the standard deviation as a percentage of the mean
- Time:
O(length)
pub fn sum(&self) -> A
[src]
pub fn sum(&self) -> A
Returns the sum of all the elements of the sample
- Time:
O(length)
pub fn t(&self, other: &Sample<A>) -> A
[src]
pub fn t(&self, other: &Sample<A>) -> A
Returns the t score between these two samples
- Time:
O(length)
pub fn var(&self, mean: Option<A>) -> A
[src]
pub fn var(&self, mean: Option<A>) -> A
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]
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,
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]
impl<'a, A: Clone> Clone for LabeledSample<'a, A> where
A: 'a + Float,
fn clone(&self) -> LabeledSample<'a, A>
[src]
fn clone(&self) -> LabeledSample<'a, A>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<'a, A: Copy> Copy for LabeledSample<'a, A> where
A: 'a + Float,
[src]
impl<'a, A: Copy> Copy for LabeledSample<'a, A> where
A: 'a + Float,
impl<'a, A> Deref for LabeledSample<'a, A> where
A: Float,
[src]
impl<'a, A> Deref for LabeledSample<'a, A> where
A: Float,
type Target = Sample<A>
The resulting type after dereferencing.
fn deref(&self) -> &Sample<A>
[src]
fn deref(&self) -> &Sample<A>
Dereferences the value.
impl<'a, A> Index<usize> for LabeledSample<'a, A> where
A: Float,
[src]
impl<'a, A> Index<usize> for LabeledSample<'a, A> where
A: Float,
type Output = Label
The returned type after indexing.
fn index(&self, i: usize) -> &Label
[src]
fn index(&self, i: usize) -> &Label
Performs the indexing (container[index]
) operation.
impl<'a, 'b, A> IntoIterator for &'b LabeledSample<'a, A> where
A: Float,
[src]
impl<'a, 'b, A> IntoIterator for &'b LabeledSample<'a, A> where
A: Float,
Auto Trait Implementations
impl<'a, A> Send for LabeledSample<'a, A>
impl<'a, A> Send for LabeledSample<'a, A>
impl<'a, A> Sync for LabeledSample<'a, A>
impl<'a, A> Sync for LabeledSample<'a, A>