pub struct RandomForestClassifierOptions { /* private fields */ }
Expand description
Random forest options.
Implementations§
Source§impl RandomForestClassifierOptions
impl RandomForestClassifierOptions
Sourcepub fn seed(&mut self, seed: u64) -> &mut Self
pub fn seed(&mut self, seed: u64) -> &mut Self
Sets the random generator seed.
The default value is random.
Sourcepub fn trees(&mut self, trees: NonZeroUsize) -> &mut Self
pub fn trees(&mut self, trees: NonZeroUsize) -> &mut Self
Sets the number of decision trees.
The default value is 100
.
Sourcepub fn max_features(&mut self, max: NonZeroUsize) -> &mut Self
pub fn max_features(&mut self, max: NonZeroUsize) -> &mut Self
Sets the number of maximum candidate features used to determine each decision tree node.
The default value is sqrt(the number of features)
.
Sourcepub fn max_samples(&mut self, max: NonZeroUsize) -> &mut Self
pub fn max_samples(&mut self, max: NonZeroUsize) -> &mut Self
Sets the maximum number of samples used to train each decision tree.
The default value is the number of rows in the target table.
Sourcepub fn parallel(&mut self) -> &mut Self
pub fn parallel(&mut self) -> &mut Self
Enables parallel executions of RandomForestClassifier::fit
.
This library use rayon
for parallel execution.
Please see the rayon document if you want to configure the behavior
(e.g., the number of worker threads).
Sourcepub fn fit<T: ClassificationCriterion>(
&self,
criterion: T,
table: Table<'_>,
) -> RandomForestClassifier
pub fn fit<T: ClassificationCriterion>( &self, criterion: T, table: Table<'_>, ) -> RandomForestClassifier
Builds a classifier model fitting the given table.
Trait Implementations§
Source§impl Clone for RandomForestClassifierOptions
impl Clone for RandomForestClassifierOptions
Source§fn clone(&self) -> RandomForestClassifierOptions
fn clone(&self) -> RandomForestClassifierOptions
Returns a copy 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 Default for RandomForestClassifierOptions
impl Default for RandomForestClassifierOptions
Source§fn default() -> RandomForestClassifierOptions
fn default() -> RandomForestClassifierOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RandomForestClassifierOptions
impl RefUnwindSafe for RandomForestClassifierOptions
impl Send for RandomForestClassifierOptions
impl Sync for RandomForestClassifierOptions
impl Unpin for RandomForestClassifierOptions
impl UnwindSafe for RandomForestClassifierOptions
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