pub struct ShingledForestBuilder<const D: usize> { /* private fields */ }Expand description
Builder producing a ShingledForest. Delegates every RCF
hyperparameter to ForestBuilder — the only extra is the
compile-time shingle size which equals the forest
dimensionality D.
The const-generic D is the shingle size: one shingled
vector = last D scalars.
Implementations§
Source§impl<const D: usize> ShingledForestBuilder<D>
impl<const D: usize> ShingledForestBuilder<D>
Sourcepub fn num_trees(self, trees: usize) -> Self
pub fn num_trees(self, trees: usize) -> Self
Number of trees — forwarded to ForestBuilder::num_trees.
Sourcepub fn sample_size(self, sample: usize) -> Self
pub fn sample_size(self, sample: usize) -> Self
Sample size — forwarded to ForestBuilder::sample_size.
Sourcepub fn seed(self, seed: u64) -> Self
pub fn seed(self, seed: u64) -> Self
Master seed — forwarded to ForestBuilder::seed.
Sourcepub fn time_decay(self, decay: f64) -> Self
pub fn time_decay(self, decay: f64) -> Self
Time-decay — forwarded to ForestBuilder::time_decay.
Sourcepub fn config(&self) -> &RcfConfig
pub fn config(&self) -> &RcfConfig
Fetch the resolved RcfConfig that Self::build would
use — mirrors ForestBuilder::config.
Sourcepub fn build(self) -> RcfResult<ShingledForest<D>>
pub fn build(self) -> RcfResult<ShingledForest<D>>
Build the shingled forest. Fails exactly when the underlying
ForestBuilder::build fails.
§Errors
Propagates ForestBuilder::build errors.
Trait Implementations§
Source§impl<const D: usize> Debug for ShingledForestBuilder<D>
impl<const D: usize> Debug for ShingledForestBuilder<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for ShingledForestBuilder<D>
impl<const D: usize> RefUnwindSafe for ShingledForestBuilder<D>
impl<const D: usize> Send for ShingledForestBuilder<D>
impl<const D: usize> Sync for ShingledForestBuilder<D>
impl<const D: usize> Unpin for ShingledForestBuilder<D>
impl<const D: usize> UnsafeUnpin for ShingledForestBuilder<D>
impl<const D: usize> UnwindSafe for ShingledForestBuilder<D>
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> 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