[−][src]Struct smartcore::linear::linear_regression::LinearRegression
Linear Regression
Implementations
impl<T: RealNumber, M: Matrix<T>> LinearRegression<T, M>
[src]
pub fn fit(
x: &M,
y: &M::RowVector,
parameters: LinearRegressionParameters
) -> Result<LinearRegression<T, M>, Failed>
[src]
x: &M,
y: &M::RowVector,
parameters: LinearRegressionParameters
) -> Result<LinearRegression<T, M>, Failed>
Fits Linear Regression to your data.
x
- NxM matrix with N observations and M features in each observation.y
- target valuesparameters
- other parameters, useDefault::default()
to set parameters to default values.
pub fn predict(&self, x: &M) -> Result<M::RowVector, Failed>
[src]
Predict target values from x
x
- KxM data where K is number of observations and M is number of features.
pub fn coefficients(&self) -> &M
[src]
Get estimates regression coefficients
pub fn intercept(&self) -> T
[src]
Get estimate of intercept
Trait Implementations
impl<T: Debug + RealNumber, M: Debug + Matrix<T>> Debug for LinearRegression<T, M>
[src]
impl<'de, T: RealNumber, M: Matrix<T>> Deserialize<'de> for LinearRegression<T, M> where
T: Deserialize<'de>,
M: Deserialize<'de>,
[src]
T: Deserialize<'de>,
M: Deserialize<'de>,
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T: RealNumber, M: Matrix<T>> PartialEq<LinearRegression<T, M>> for LinearRegression<T, M>
[src]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: RealNumber, M: Matrix<T>> Predictor<M, <M as BaseMatrix<T>>::RowVector> for LinearRegression<T, M>
[src]
impl<T: RealNumber, M: Matrix<T>> Serialize for LinearRegression<T, M> where
T: Serialize,
M: Serialize,
[src]
T: Serialize,
M: Serialize,
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: RealNumber, M: Matrix<T>> SupervisedEstimator<M, <M as BaseMatrix<T>>::RowVector, LinearRegressionParameters> for LinearRegression<T, M>
[src]
Auto Trait Implementations
impl<T, M> RefUnwindSafe for LinearRegression<T, M> where
M: RefUnwindSafe,
T: RefUnwindSafe,
[src]
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for LinearRegression<T, M> where
M: Send,
T: Send,
[src]
M: Send,
T: Send,
impl<T, M> Sync for LinearRegression<T, M> where
M: Sync,
T: Sync,
[src]
M: Sync,
T: Sync,
impl<T, M> Unpin for LinearRegression<T, M> where
M: Unpin,
T: Unpin,
[src]
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for LinearRegression<T, M> where
M: UnwindSafe,
T: UnwindSafe,
[src]
M: UnwindSafe,
T: 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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,