pub struct LinearRegression { /* private fields */ }
Implementations§
Source§impl LinearRegression
impl LinearRegression
pub fn new(series: &TimeSeries) -> Self
pub fn slope(&self) -> f64
pub fn cons(&self) -> f64
Sourcepub fn calculate(&self, x: f64) -> f64
pub fn calculate(&self, x: f64) -> f64
Calculates a regression value using this linear regression’s found function
pub fn as_time_series(&self) -> TimeSeries
pub fn get_data(&self) -> Vec<(f64, f64)>
pub fn style(&self) -> Style
Trait Implementations§
Source§impl Clone for LinearRegression
impl Clone for LinearRegression
Source§fn clone(&self) -> LinearRegression
fn clone(&self) -> LinearRegression
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 LinearRegression
impl RefUnwindSafe for LinearRegression
impl Send for LinearRegression
impl Sync for LinearRegression
impl Unpin for LinearRegression
impl UnwindSafe for LinearRegression
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