Skip to main content

Model

Trait Model 

Source
pub trait Model {
    type Fitted: Fitted;

    // Required method
    fn fit(&self, design: &Design, y: &[f64]) -> Result<Self::Fitted>;
}
Expand description

A model specification that can be fitted: a GLM, a GAM, a network.

fit takes the design (with offset and weights) and the response, and returns the fitted model. Specs are cheap values; fitting does the work.

Required Associated Types§

Required Methods§

Source

fn fit(&self, design: &Design, y: &[f64]) -> Result<Self::Fitted>

Fits the model to design and response y.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§