Skip to main content

Fitted

Trait Fitted 

Source
pub trait Fitted {
    // Required methods
    fn predict(&self, design: &Design) -> Result<Vec<f64>>;
    fn predict_distribution(
        &self,
        design: &Design,
        n_sims: usize,
        seed: u64,
    ) -> Result<PredictiveDistribution>;
}
Expand description

A fitted model: predictions, joint predictive distributions, scores.

Required Methods§

Source

fn predict(&self, design: &Design) -> Result<Vec<f64>>

Expected response for each row of design.

Source

fn predict_distribution( &self, design: &Design, n_sims: usize, seed: u64, ) -> Result<PredictiveDistribution>

Joint predictive distribution of the response across the rows of design: n_sims simulations × rows, each simulation drawn from stream sim of seed, so results do not depend on thread count. Draws carry parameter and process uncertainty, and are joint because anything summed later (cells into reserves, policies into a portfolio) needs the joint draws, not per-row marginals.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§