pub struct MultipleLinearRegression<T = f64>{
pub coefficients: Vec<T>,
pub r_squared: T,
pub adjusted_r_squared: T,
pub standard_error: T,
pub n: usize,
pub p: usize,
}Expand description
Multiple linear regression model that fits a hyperplane to multivariate data points.
Fields§
§coefficients: Vec<T>Regression coefficients, including intercept as the first element
r_squared: TCoefficient of determination (R²) - goodness of fit
adjusted_r_squared: TAdjusted R² which accounts for the number of predictors
standard_error: TStandard error of the estimate
n: usizeNumber of data points used for regression
p: usizeNumber of predictor variables (excluding intercept)
Implementations§
Source§impl<T> MultipleLinearRegression<T>
impl<T> MultipleLinearRegression<T>
Sourcepub fn predict_many<U>(&self, x_values: &[Vec<U>]) -> Vec<T>
pub fn predict_many<U>(&self, x_values: &[Vec<U>]) -> Vec<T>
Trait Implementations§
Source§impl<T> Clone for MultipleLinearRegression<T>
impl<T> Clone for MultipleLinearRegression<T>
Source§fn clone(&self) -> MultipleLinearRegression<T>
fn clone(&self) -> MultipleLinearRegression<T>
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 moreSource§impl<T> Debug for MultipleLinearRegression<T>
impl<T> Debug for MultipleLinearRegression<T>
Source§impl<T> Default for MultipleLinearRegression<T>
impl<T> Default for MultipleLinearRegression<T>
Source§impl<'de, T> Deserialize<'de> for MultipleLinearRegression<T>
impl<'de, T> Deserialize<'de> for MultipleLinearRegression<T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for MultipleLinearRegression<T>where
T: Freeze,
impl<T> RefUnwindSafe for MultipleLinearRegression<T>where
T: RefUnwindSafe,
impl<T> Send for MultipleLinearRegression<T>where
T: Send,
impl<T> Sync for MultipleLinearRegression<T>where
T: Sync,
impl<T> Unpin for MultipleLinearRegression<T>where
T: Unpin,
impl<T> UnwindSafe for MultipleLinearRegression<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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