Struct fann::CascadeParams

source ·
pub struct CascadeParams {
    pub output_change_fraction: c_float,
    pub output_stagnation_epochs: c_uint,
    pub candidate_change_fraction: c_float,
    pub candidate_stagnation_epochs: c_uint,
    pub candidate_limit: fann_type,
    pub weight_multiplier: fann_type,
    pub max_out_epochs: c_uint,
    pub max_cand_epochs: c_uint,
    pub activation_functions: Vec<ActivationFunc>,
    pub activation_steepnesses: Vec<fann_type>,
    pub num_candidate_groups: c_uint,
}
Expand description

Parameters for cascade training.

Fields§

§output_change_fraction: c_float

A number between 0 and 1 determining how large a fraction the mean square error should change within output_stagnation_epochs during training of the output connections, in order for the training to stagnate. After stagnation, training of the output connections ends and new candidates are prepared.

This means: If the MSE does not change by a fraction of output_change_fraction during a period of output_stagnation_epochs, the training of the output connections is stopped because training has stagnated.

§output_stagnation_epochs: c_uint

The number of epochs training is allowed to continue without changing the MSE by a fraction of at least output_change_fraction.

§candidate_change_fraction: c_float

A number between 0 and 1 determining how large a fraction the mean square error should change within candidate_stagnation_epochs during training of the candidate neurons, in order for the training to stagnate. After stagnation, training of the candidate neurons is stopped and the best candidate is selected.

This means: If the MSE does not change by a fraction of candidate_change_fraction during a period of candidate_stagnation_epochs, the training of the candidate neurons is stopped because training has stagnated.

§candidate_stagnation_epochs: c_uint

The number of epochs training is allowed to continue without changing the MSE by a fraction of candidate_change_fraction.

§candidate_limit: fann_type

A limit for how much the candidate neuron may be trained. It limits the ratio between the MSE and the candidate score.

§weight_multiplier: fann_type

Multiplier for the weight of the candidate neuron before adding it to the network. Usually between 0 and 1, to make training less aggressive.

§max_out_epochs: c_uint

The maximum number of epochs the output connections may be trained after adding a new candidate neuron.

§max_cand_epochs: c_uint

The maximum number of epochs the input connections to the candidates may be trained before adding a new candidate neuron.

§activation_functions: Vec<ActivationFunc>

The activation functions for the candidate neurons.

§activation_steepnesses: Vec<fann_type>

The activation function steepness values for the candidate neurons.

§num_candidate_groups: c_uint

The number of candidate neurons to be trained for each combination of activation function and steepness.

Implementations§

source§

impl CascadeParams

source

pub fn get_num_candidates(&self) -> c_uint

The number of candidates used during training: the number of combinations of activation functions and steepnesses, times num_candidate_groups.

For every combination of activation function and steepness, num_candidate_groups such neurons, with different initial weights, are trained.

Trait Implementations§

source§

impl Clone for CascadeParams

source§

fn clone(&self) -> CascadeParams

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CascadeParams

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for CascadeParams

source§

fn default() -> CascadeParams

Returns the “default value” for a type. Read more
source§

impl PartialEq for CascadeParams

source§

fn eq(&self, other: &CascadeParams) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for CascadeParams

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.