Struct criterion_stats::bivariate::regression::Slope [−][src]
pub struct Slope<A>(pub A)
where
A: Float;
A straight line that passes through the origin y = m * x
Methods
impl<A> Slope<A> where
A: Float,
[src]
impl<A> Slope<A> where
A: Float,
pub fn fit(data: Data<A, A>) -> Slope<A>
[src]
pub fn fit(data: Data<A, A>) -> Slope<A>
Fits the data to a straight line that passes through the origin using ordinary least squares
- Time:
O(length)
pub fn r_squared(&self, data: Data<A, A>) -> A
[src]
pub fn r_squared(&self, data: Data<A, A>) -> A
Computes the goodness of fit (coefficient of determination) for this data set
- Time:
O(length)
Trait Implementations
impl<A: Clone> Clone for Slope<A> where
A: Float,
[src]
impl<A: Clone> Clone for Slope<A> where
A: Float,
fn clone(&self) -> Slope<A>
[src]
fn clone(&self) -> Slope<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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<A: Copy> Copy for Slope<A> where
A: Float,
[src]
impl<A: Copy> Copy for Slope<A> where
A: Float,