pub struct RandomForest { /* private fields */ }Expand description
Bagged ensemble of decision trees.
The forest stores full semantic Model trees rather than a bespoke forest
node format. That costs some memory, but it keeps IR conversion,
introspection, and optimized lowering consistent with the single-tree path.
Implementations§
Source§impl RandomForest
impl RandomForest
pub fn new( task: Task, criterion: Criterion, tree_type: TreeType, trees: Vec<Model>, compute_oob: bool, oob_score: Option<f64>, max_features: usize, seed: Option<u64>, num_features: usize, feature_preprocessing: Vec<FeaturePreprocessing>, ) -> Self
pub fn predict_table(&self, table: &dyn TableAccess) -> Vec<f64>
pub fn predict_proba_table( &self, table: &dyn TableAccess, ) -> Result<Vec<Vec<f64>>, PredictError>
pub fn task(&self) -> Task
pub fn criterion(&self) -> Criterion
pub fn tree_type(&self) -> TreeType
pub fn trees(&self) -> &[Model]
pub fn num_features(&self) -> usize
pub fn feature_preprocessing(&self) -> &[FeaturePreprocessing]
pub fn training_metadata(&self) -> TrainingMetadata
pub fn class_labels(&self) -> Option<Vec<f64>>
pub fn oob_score(&self) -> Option<f64>
Trait Implementations§
Source§impl Clone for RandomForest
impl Clone for RandomForest
Source§fn clone(&self) -> RandomForest
fn clone(&self) -> RandomForest
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RandomForest
impl RefUnwindSafe for RandomForest
impl Send for RandomForest
impl Sync for RandomForest
impl Unpin for RandomForest
impl UnsafeUnpin for RandomForest
impl UnwindSafe for RandomForest
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