pub struct MSTLModel<T> { /* private fields */ }
Expand description
A model that uses the MSTL to decompose a time series into trend, seasonal and remainder components, and then uses a trend model to forecast the trend component.
Implementations§
Source§impl MSTLModel<NaiveTrend>
impl MSTLModel<NaiveTrend>
Source§impl<T: TrendModel> MSTLModel<T>
impl<T: TrendModel> MSTLModel<T>
Sourcepub fn trend_model(&self) -> &T
pub fn trend_model(&self) -> &T
Return a reference to the trend model.
Source§impl<T: TrendModel> MSTLModel<T>
impl<T: TrendModel> MSTLModel<T>
Sourcepub fn new(periods: Vec<usize>, trend_model: T) -> Self
pub fn new(periods: Vec<usize>, trend_model: T) -> Self
Create a new MSTL model with the given trend model.
Sourcepub fn impute(self, impute: bool) -> Self
pub fn impute(self, impute: bool) -> Self
Set whether to impute missing values in the time series.
If true
, then missing values will be imputed using
linear interpolation before fitting the model.
Sourcepub fn mstl_params(self, params: MstlParams) -> Self
pub fn mstl_params(self, params: MstlParams) -> Self
Set the parameters for the MSTL algorithm.
This can be used to control the parameters for the inner STL algorithm
by using stlrs::MstlParams
.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for MSTLModel<T>where
T: Freeze,
impl<T> RefUnwindSafe for MSTLModel<T>where
T: RefUnwindSafe,
impl<T> Send for MSTLModel<T>where
T: Send,
impl<T> Sync for MSTLModel<T>where
T: Sync,
impl<T> Unpin for MSTLModel<T>where
T: Unpin,
impl<T> UnwindSafe for MSTLModel<T>where
T: UnwindSafe,
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