pub trait Model: Send + Sync {
// Required methods
fn name(&self) -> String;
fn description(&self) -> String;
fn fit(&self, y: Series<'_>) -> Option<Box<dyn Fitted>>;
// Provided method
fn forecast(&self, y: Series<'_>, h: usize) -> Option<Vec<f64>> { ... }
}Expand description
A forecasting method, before seeing any data.
Fitting is separate from forecasting so a fitted model can be inspected and asked for any horizon without being estimated again. Models are plain configuration, shared between the threads of a backtest.
Required Methods§
Sourcefn description(&self) -> String
fn description(&self) -> String
One-line description of the method.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".