Struct stamm::randforest::RandomForest
[−]
[src]
pub struct RandomForest<L, F> where
F: TreeFunction, { /* fields omitted */ }
A random forest to combine some decision trees.
The decision trees have leafs with data from type L
and use a TreeFunction from type F
.
Methods
impl<L, F> RandomForest<L, F> where
F: TreeFunction,
[src]
F: TreeFunction,
pub fn forest_predictions(&self, input: &F::Data) -> Vec<&L>
[src]
Let every tree predict a result of the input
.
Returns the results in form a Vec of the leaf data.
pub fn predict<V>(&self, input: &F::Data, voting_method: V) -> Option<f64> where
V: VotingMethod<L>,
[src]
V: VotingMethod<L>,
Let every tree predict a result and combine them using a vote method.
impl<L, F> RandomForest<L, F> where
F: TreeFunction + Send + Sync,
<F as TreeFunction>::Param: Send + Sync,
<F as TreeFunction>::Data: Send + Sync,
L: Send + Sync,
[src]
F: TreeFunction + Send + Sync,
<F as TreeFunction>::Param: Send + Sync,
<F as TreeFunction>::Data: Send + Sync,
L: Send + Sync,
pub fn forest_predictions_parallel(&self, input: &F::Data) -> Vec<&L>
[src]
Like forest_predictions
but use rayon to parallelize the computation.
Trait Implementations
Auto Trait Implementations
impl<L, F> Send for RandomForest<L, F> where
F: Send,
L: Send,
<F as TreeFunction>::Param: Send,
F: Send,
L: Send,
<F as TreeFunction>::Param: Send,
impl<L, F> Sync for RandomForest<L, F> where
F: Sync,
L: Sync,
<F as TreeFunction>::Param: Sync,
F: Sync,
L: Sync,
<F as TreeFunction>::Param: Sync,