pub struct AutoETS { /* private fields */ }Expand description
Automatic exponential smoothing model search.
Implementations§
Source§impl AutoETS
impl AutoETS
Sourcepub fn new(season_length: usize, spec: String) -> PyResult<Self>
pub fn new(season_length: usize, spec: String) -> PyResult<Self>
Create a new AutoETS model search instance.
§Errors
If the spec string is invalid, this function returns an error.
Sourcepub fn fit(&mut self, y: PyReadonlyArrayDyn<'_, f64>) -> PyResult<()>
pub fn fit(&mut self, y: PyReadonlyArrayDyn<'_, f64>) -> PyResult<()>
Search for the best model, fitting it to the data.
The model will be stored on the inner AutoETS instance, after which
forecasts can be produced using its predict method.
§Errors
If no model can be found, or if any parameters are invalid, this function returns an error.
Sourcepub fn predict(&self, horizon: usize, level: Option<f64>) -> PyResult<Forecast>
pub fn predict(&self, horizon: usize, level: Option<f64>) -> PyResult<Forecast>
Predict the next horizon values using the best model, optionally including
prediction intervals at the specified level.
level should be a float between 0 and 1 representing the confidence level.
§Errors
This function will return an error if no model has been fit yet (using AutoETS::fit).
Sourcepub fn predict_in_sample(&self, level: Option<f64>) -> PyResult<Forecast>
pub fn predict_in_sample(&self, level: Option<f64>) -> PyResult<Forecast>
Get the in-sample predictions for the model, optionally including prediction intervals at the specified level.
level should be a float between 0 and 1 representing the confidence level.
§Errors
This function will return an error if no model has been fit yet (using AutoETS::fit).
Trait Implementations§
Source§impl PyClassImpl for AutoETS
impl PyClassImpl for AutoETS
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§type ThreadChecker = ThreadCheckerStub<AutoETS>
type ThreadChecker = ThreadCheckerStub<AutoETS>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature<AutoETS> for PyClassImplCollector<AutoETS>
impl PyClassNewTextSignature<AutoETS> for PyClassImplCollector<AutoETS>
fn new_text_signature(self) -> Option<&'static str>
Source§impl PyMethods<AutoETS> for PyClassImplCollector<AutoETS>
impl PyMethods<AutoETS> for PyClassImplCollector<AutoETS>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for AutoETS
impl PyTypeInfo for AutoETS
Source§type AsRefTarget = PyCell<AutoETS>
type AsRefTarget = PyCell<AutoETS>
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
object is an instance of this type or a subclass of this type.Source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
object is an instance of this type.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> 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<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§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.