Struct programinduction::pcfg::GeneticParams
source · pub struct GeneticParams {
pub progeny_factor: f64,
pub mutation_point: f64,
pub mutation_subtree: f64,
pub mutation_reproduction: f64,
}
Expand description
Parameters for PCFG genetic programming (GP
).
Values for each mutation_
field should be probabilities that sum to 1. Every mutation will
randomly select one of these variants.
Fields§
§progeny_factor: f64
The progeny factor determines the distribution over nodes in a statement when a
node/subtree is randomly selected. If set to 1
, each node has uniform probability of
being chosen for mutation. If set to 2
, then every parent is half as likely to be chosen
than any one of its children.
mutation_point: f64
A point mutation replaces a single node with a valid rule that may take its place, without changing any children.
mutation_subtree: f64
A subtree mutation replaces a subtree with a valid sentence that may take its place.
mutation_reproduction: f64
A reproduction mutation is a no-op.
Trait Implementations§
source§impl Default for GeneticParams
impl Default for GeneticParams
source§fn default() -> GeneticParams
fn default() -> GeneticParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for GeneticParams
impl Send for GeneticParams
impl Sync for GeneticParams
impl Unpin for GeneticParams
impl UnwindSafe for GeneticParams
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