pub struct Seasonality { /* private fields */ }Expand description
A seasonality to include in the model.
Implementations§
Source§impl Seasonality
impl Seasonality
Sourcepub fn new(period: PositiveFloat, fourier_order: NonZeroU32) -> Self
pub fn new(period: PositiveFloat, fourier_order: NonZeroU32) -> Self
Create a new Seasonality with the given period and fourier order.
By default, the prior scale and mode will be inherited from the Prophet model config, and the seasonality is assumed to be non-conditional.
Sourcepub fn with_prior_scale(self, prior_scale: PositiveFloat) -> Self
pub fn with_prior_scale(self, prior_scale: PositiveFloat) -> Self
Set the prior scale of this seasonality.
By default, seasonalities inherit the prior scale configured on the Prophet model; this allows the prior scale to be customised for each seasonality.
Sourcepub fn with_mode(self, mode: FeatureMode) -> Self
pub fn with_mode(self, mode: FeatureMode) -> Self
Set the mode of this seasonality.
By default, seasonalities inherit the mode configured on the Prophet model; this allows the mode to be customised for each seasonality.
Sourcepub fn with_condition(self, condition_name: String) -> Self
pub fn with_condition(self, condition_name: String) -> Self
Set this seasonality as conditional.
A column with the provided condition name must be
present in the data passed to Prophet otherwise
training will fail. This can be added with
TrainingData::with_seasonality_conditions.
Trait Implementations§
Source§impl Clone for Seasonality
impl Clone for Seasonality
Source§fn clone(&self) -> Seasonality
fn clone(&self) -> Seasonality
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Seasonality
impl RefUnwindSafe for Seasonality
impl Send for Seasonality
impl Sync for Seasonality
impl Unpin for Seasonality
impl UnwindSafe for Seasonality
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§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.