Struct augurs_ets::AutoETS
source · pub struct AutoETS { /* private fields */ }
Expand description
Automatic ETS model selection.
Implementations§
source§impl AutoETS
impl AutoETS
sourcepub fn new(
season_length: usize,
spec: impl TryInto<AutoSpec, Error = Error>,
) -> Result<Self, Error>
pub fn new( season_length: usize, spec: impl TryInto<AutoSpec, Error = Error>, ) -> Result<Self, Error>
Create a new AutoETS
model with the given period and model search specification string.
The specification string should be of the form XXX
where the first character is the error
component, the second is the trend component, and the third is the seasonal component. The
possible values for each component are:
N
for no componentA
for additiveM
for multiplicativeZ
for automatic
Using Z
for any component will cause the model to try all possible values for that component.
For example, ZAZ
will try all possible error and seasonal components, but only additive
trend components.
§Errors
An error will be returned if the specification string is not of the correct length or contains invalid characters.
sourcepub fn from_spec(season_length: usize, spec: AutoSpec) -> Self
pub fn from_spec(season_length: usize, spec: AutoSpec) -> Self
Create a new AutoETS
model with the given period and model search specification.
sourcepub fn season_length(&self) -> usize
pub fn season_length(&self) -> usize
Get the season length of the model.
sourcepub fn non_seasonal() -> Self
pub fn non_seasonal() -> Self
Create a new AutoETS
model search without any seasonal components.
Equivalent to AutoETS::new(1, "ZZN")
.
sourcepub fn damped(self, damped: bool) -> Result<Self, Error>
pub fn damped(self, damped: bool) -> Result<Self, Error>
Fix the search to consider only damped or undamped trend.
sourcepub fn alpha(self, alpha: f64) -> Self
pub fn alpha(self, alpha: f64) -> Self
Set the value of alpha
to use when fitting the model.
See the docs for Params::alpha
for more details on alpha
.
sourcepub fn beta(self, beta: f64) -> Self
pub fn beta(self, beta: f64) -> Self
Set the value of beta
to use when fitting the model.
See the docs for Params::beta
for more details on beta
.
sourcepub fn gamma(self, gamma: f64) -> Self
pub fn gamma(self, gamma: f64) -> Self
Set the value of gamma
to use when fitting the model.
See the docs for Params::gamma
for more details on gamma
.
sourcepub fn phi(self, phi: f64) -> Self
pub fn phi(self, phi: f64) -> Self
Set the value of phi
to use when fitting the model.
See the docs for Params::phi
for more details on phi
.
sourcepub fn allow_multiplicative_trend(self, allow: bool) -> Self
pub fn allow_multiplicative_trend(self, allow: bool) -> Self
Include models with multiplicative trend during automatic model selection.
By default, models with multiplicative trend are excluded from the search space.
Trait Implementations§
source§impl Fit for AutoETS
impl Fit for AutoETS
source§fn fit(&self, y: &[f64]) -> Result<Self::Fitted, Error>
fn fit(&self, y: &[f64]) -> Result<Self::Fitted, Error>
Search for the best model, fitting it to the data.
The model is stored on the AutoETS
struct and can be retrieved with
the model
method. It is also returned by this function.
§Errors
If no model can be found, or if any parameters are invalid, this function returns an error.
§type Fitted = FittedAutoETS
type Fitted = FittedAutoETS
fit
method.Auto Trait Implementations§
impl Freeze for AutoETS
impl RefUnwindSafe for AutoETS
impl Send for AutoETS
impl Sync for AutoETS
impl Unpin for AutoETS
impl UnwindSafe for AutoETS
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.