Struct smartcore::linear::logistic_regression::LogisticRegression
source · pub struct LogisticRegression<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> { /* private fields */ }
Expand description
Logistic Regression
Implementations§
source§impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> LogisticRegression<TX, TY, X, Y>
impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> LogisticRegression<TX, TY, X, Y>
sourcepub fn fit(
x: &X,
y: &Y,
parameters: LogisticRegressionParameters<TX>
) -> Result<LogisticRegression<TX, TY, X, Y>, Failed>
pub fn fit( x: &X, y: &Y, parameters: LogisticRegressionParameters<TX> ) -> Result<LogisticRegression<TX, TY, X, Y>, Failed>
Fits Logistic Regression to your data.
x
- NxM matrix with N observations and M features in each observation.y
- target class valuesparameters
- other parameters, useDefault::default()
to set parameters to default values.
sourcepub fn predict(&self, x: &X) -> Result<Y, Failed>
pub fn predict(&self, x: &X) -> Result<Y, Failed>
Predict class labels for samples in x
.
x
- KxM data where K is number of observations and M is number of features.
sourcepub fn coefficients(&self) -> &X
pub fn coefficients(&self) -> &X
Get estimates regression coefficients, this create a sharable reference
Trait Implementations§
source§impl<TX: Debug + Number + FloatNumber + RealNumber, TY: Debug + Number + Ord, X: Debug + Array2<TX>, Y: Debug + Array1<TY>> Debug for LogisticRegression<TX, TY, X, Y>
impl<TX: Debug + Number + FloatNumber + RealNumber, TY: Debug + Number + Ord, X: Debug + Array2<TX>, Y: Debug + Array1<TY>> Debug for LogisticRegression<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> PartialEq<LogisticRegression<TX, TY, X, Y>> for LogisticRegression<TX, TY, X, Y>
impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> PartialEq<LogisticRegression<TX, TY, X, Y>> for LogisticRegression<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> Predictor<X, Y> for LogisticRegression<TX, TY, X, Y>
impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> Predictor<X, Y> for LogisticRegression<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, LogisticRegressionParameters<TX>> for LogisticRegression<TX, TY, X, Y>
impl<TX: Number + FloatNumber + RealNumber, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, LogisticRegressionParameters<TX>> for LogisticRegression<TX, TY, X, Y>
Auto Trait Implementations§
impl<TX, TY, X, Y> RefUnwindSafe for LogisticRegression<TX, TY, X, Y>where TX: RefUnwindSafe, TY: RefUnwindSafe, X: RefUnwindSafe, Y: RefUnwindSafe,
impl<TX, TY, X, Y> Send for LogisticRegression<TX, TY, X, Y>where TX: Send, TY: Send, X: Send, Y: Send,
impl<TX, TY, X, Y> Sync for LogisticRegression<TX, TY, X, Y>where TX: Sync, TY: Sync, X: Sync, Y: Sync,
impl<TX, TY, X, Y> Unpin for LogisticRegression<TX, TY, X, Y>where TX: Unpin, TY: Unpin, X: Unpin, Y: Unpin,
impl<TX, TY, X, Y> UnwindSafe for LogisticRegression<TX, TY, X, Y>where TX: UnwindSafe, TY: UnwindSafe, X: UnwindSafe, Y: 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