Struct prophet::Mentor
[−]
[src]
pub struct Mentor<LR: LearnRateConfigState, LM: LearnMomentumConfigState, CR: CriterionConfigState, SC: SchedulingConfigState, LG: LogConfigState> { /* fields omitted */ }
Mentor follows the builder pattern to incrementally build properties for the training session and delay any expensive computations until the go routine is called.
Methods
impl<LM, CR, SC, LG> Mentor<Unset, LM, CR, SC, LG> where
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
[src]
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
fn learn_rate(self, learn_rate: f64) -> Mentor<Set, LM, CR, SC, LG>
Use the given fixed learn rate.
Default learn rate is adapting behaviour.
Panics if given learn rate is invalid!
impl<LR, CR, SC, LG> Mentor<LR, Unset, CR, SC, LG> where
LR: LearnRateConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
[src]
LR: LearnRateConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
fn learn_momentum(self, learn_momentum: f64) -> Mentor<LR, Set, CR, SC, LG>
Use the given fixed learn momentum.
Default learn momentum is fixed at 0.5
.
Panics if given learn momentum is invalid
impl<LR, LM, SC, LG> Mentor<LR, LM, Unset, SC, LG> where
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
[src]
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
fn criterion(self, criterion: Criterion) -> Mentor<LR, LM, Set, SC, LG>
Use the given criterion.
Default criterion is AvgNetError(0.05)
.
impl<LR, LM, CR, LG> Mentor<LR, LM, CR, Unset, LG> where
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
LG: LogConfigState,
[src]
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
LG: LogConfigState,
fn scheduling(self, kind: Scheduling) -> Mentor<LR, LM, CR, Set, LG>
Use the given scheduling routine.
Default scheduling routine is to pick random samples.
impl<LR, LM, CR, SC> Mentor<LR, LM, CR, SC, Unset> where
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
[src]
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
fn log_config(self, config: LogConfig) -> Mentor<LR, LM, CR, SC, Set>
Use the given logging configuration.
Default logging configuration is to never log anything.
impl<LR, LM, CR, SC, LG> Mentor<LR, LM, CR, SC, LG> where
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
[src]
LR: LearnRateConfigState,
LM: LearnMomentumConfigState,
CR: CriterionConfigState,
SC: SchedulingConfigState,
LG: LogConfigState,
fn go(self) -> Result<NeuralNet>
Checks invariants about the given settings for the learning procedure such as checking if learn rate is within bounds or the samples are of correct sizes for the underlying neural network etc.
Then starts the learning procedure and returns the fully trained neural network (Prophet) that is capable to predict data if no errors occured while training it.
Trait Implementations
impl<LR: Debug + LearnRateConfigState, LM: Debug + LearnMomentumConfigState, CR: Debug + CriterionConfigState, SC: Debug + SchedulingConfigState, LG: Debug + LogConfigState> Debug for Mentor<LR, LM, CR, SC, LG>
[src]
impl<LR: Clone + LearnRateConfigState, LM: Clone + LearnMomentumConfigState, CR: Clone + CriterionConfigState, SC: Clone + SchedulingConfigState, LG: Clone + LogConfigState> Clone for Mentor<LR, LM, CR, SC, LG>
[src]
fn clone(&self) -> Mentor<LR, LM, CR, SC, LG>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more