pub struct RandomForestClassifier<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> { /* private fields */ }
Expand description
Random Forest Classifier
Implementations§
source§impl<TX: FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> RandomForestClassifier<TX, TY, X, Y>
impl<TX: FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> RandomForestClassifier<TX, TY, X, Y>
sourcepub fn fit(
x: &X,
y: &Y,
parameters: RandomForestClassifierParameters
) -> Result<RandomForestClassifier<TX, TY, X, Y>, Failed>
pub fn fit( x: &X, y: &Y, parameters: RandomForestClassifierParameters ) -> Result<RandomForestClassifier<TX, TY, X, Y>, Failed>
Build a forest of trees from the training set.
x
- NxM matrix with N observations and M features in each observation.y
- the target class values
sourcepub fn predict(&self, x: &X) -> Result<Y, Failed>
pub fn predict(&self, x: &X) -> Result<Y, Failed>
Predict class for x
x
- KxM data where K is number of observations and M is number of features.
sourcepub fn predict_oob(&self, x: &X) -> Result<Y, Failed>
pub fn predict_oob(&self, x: &X) -> Result<Y, Failed>
Predict OOB classes for x
. x
is expected to be equal to the dataset used in training.
Trait Implementations§
source§impl<TX: Debug + Number + FloatNumber + PartialOrd, TY: Debug + Number + Ord, X: Debug + Array2<TX>, Y: Debug + Array1<TY>> Debug for RandomForestClassifier<TX, TY, X, Y>
impl<TX: Debug + Number + FloatNumber + PartialOrd, TY: Debug + Number + Ord, X: Debug + Array2<TX>, Y: Debug + Array1<TY>> Debug for RandomForestClassifier<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> PartialEq<RandomForestClassifier<TX, TY, X, Y>> for RandomForestClassifier<TX, TY, X, Y>
impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> PartialEq<RandomForestClassifier<TX, TY, X, Y>> for RandomForestClassifier<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> Predictor<X, Y> for RandomForestClassifier<TX, TY, X, Y>
impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> Predictor<X, Y> for RandomForestClassifier<TX, TY, X, Y>
source§impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, RandomForestClassifierParameters> for RandomForestClassifier<TX, TY, X, Y>
impl<TX: Number + FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY>> SupervisedEstimator<X, Y, RandomForestClassifierParameters> for RandomForestClassifier<TX, TY, X, Y>
Auto Trait Implementations§
impl<TX, TY, X, Y> RefUnwindSafe for RandomForestClassifier<TX, TY, X, Y>where TX: RefUnwindSafe, TY: RefUnwindSafe, X: RefUnwindSafe, Y: RefUnwindSafe,
impl<TX, TY, X, Y> Send for RandomForestClassifier<TX, TY, X, Y>where TX: Send, TY: Send, X: Send, Y: Send,
impl<TX, TY, X, Y> Sync for RandomForestClassifier<TX, TY, X, Y>where TX: Sync, TY: Sync, X: Sync, Y: Sync,
impl<TX, TY, X, Y> Unpin for RandomForestClassifier<TX, TY, X, Y>where TX: Unpin, TY: Unpin, X: Unpin, Y: Unpin,
impl<TX, TY, X, Y> UnwindSafe for RandomForestClassifier<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