Struct programinduction::lambda::CompressionParams [] [src]

pub struct CompressionParams {
    pub pseudocounts: u64,
    pub topk: usize,
    pub structure_penalty: f64,
    pub aic: f64,
    pub arity: u32,
}

Parameters for grammar induction.

Proposed grammars are scored as likelihood - aic * #primitives - structure_penalty * #nodes. Additionally, pseudocounts affects the likelihood calculation, and topk and arity affect what fragments can be proposed.

Fields

Pseudocounts are added to the observed counts associated with each primitive and invented expression.

Rather than using every expression in the frontier for proposing fragments, only use the topk best expressions in each frontier.

Structure penalty penalizes the total number of nodes in each Expression of the grammar's primitives and invented expressions.

AIC is a penalty in the number of parameters, i.e. the number of primitives and invented expressions.

Arity is the largest applicative depth of an expression that may be manipulated to propose a fragment.

Trait Implementations

impl Default for CompressionParams
[src]

[src]

The default params prevent completely discarding of primives by having non-zero pseudocounts.

CompressionParams {
    pseudocounts: 5,
    topk: 2,
    structure_penalty: 1f64,
    aic: 1f64,
    arity: 2,
}

Auto Trait Implementations