Struct smartcore::neighbors::knn_regressor::KNNRegressor
source · pub struct KNNRegressor<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> { /* private fields */ }
Expand description
K Nearest Neighbors Regressor
Implementations§
source§impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> KNNRegressor<TX, TY, X, Y, D>
impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> KNNRegressor<TX, TY, X, Y, D>
sourcepub fn fit(
x: &X,
y: &Y,
parameters: KNNRegressorParameters<TX, D>
) -> Result<KNNRegressor<TX, TY, X, Y, D>, Failed>
pub fn fit( x: &X, y: &Y, parameters: KNNRegressorParameters<TX, D> ) -> Result<KNNRegressor<TX, TY, X, Y, D>, Failed>
Fits KNN regressor to a NxM matrix where N is number of samples and M is number of features.
x
- training datay
- vector with real valuesparameters
- additional parameters like search algorithm and k
Trait Implementations§
source§impl<TX: Debug + Number, TY: Debug + Number, X: Debug + Array2<TX>, Y: Debug + Array1<TY>, D: Debug + Distance<Vec<TX>>> Debug for KNNRegressor<TX, TY, X, Y, D>
impl<TX: Debug + Number, TY: Debug + Number, X: Debug + Array2<TX>, Y: Debug + Array1<TY>, D: Debug + Distance<Vec<TX>>> Debug for KNNRegressor<TX, TY, X, Y, D>
source§impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> PartialEq<KNNRegressor<TX, TY, X, Y, D>> for KNNRegressor<TX, TY, X, Y, D>
impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> PartialEq<KNNRegressor<TX, TY, X, Y, D>> for KNNRegressor<TX, TY, X, Y, D>
source§impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> Predictor<X, Y> for KNNRegressor<TX, TY, X, Y, D>
impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> Predictor<X, Y> for KNNRegressor<TX, TY, X, Y, D>
source§impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> SupervisedEstimator<X, Y, KNNRegressorParameters<TX, D>> for KNNRegressor<TX, TY, X, Y, D>
impl<TX: Number, TY: Number, X: Array2<TX>, Y: Array1<TY>, D: Distance<Vec<TX>>> SupervisedEstimator<X, Y, KNNRegressorParameters<TX, D>> for KNNRegressor<TX, TY, X, Y, D>
Auto Trait Implementations§
impl<TX, TY, X, Y, D> RefUnwindSafe for KNNRegressor<TX, TY, X, Y, D>where D: RefUnwindSafe, TX: RefUnwindSafe, TY: RefUnwindSafe, X: RefUnwindSafe, Y: RefUnwindSafe,
impl<TX, TY, X, Y, D> Send for KNNRegressor<TX, TY, X, Y, D>where D: Send, TX: Send, TY: Send, X: Send, Y: Send,
impl<TX, TY, X, Y, D> Sync for KNNRegressor<TX, TY, X, Y, D>where D: Sync, TX: Sync, TY: Sync, X: Sync, Y: Sync,
impl<TX, TY, X, Y, D> Unpin for KNNRegressor<TX, TY, X, Y, D>where D: Unpin, TX: Unpin, TY: Unpin, X: Unpin, Y: Unpin,
impl<TX, TY, X, Y, D> UnwindSafe for KNNRegressor<TX, TY, X, Y, D>where D: UnwindSafe, 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