Skip to main content

ProphetOptions

Struct ProphetOptions 

Source
pub struct ProphetOptions {
Show 17 fields pub growth: GrowthType, pub changepoints: Option<Vec<TimestampSeconds>>, pub n_changepoints: u32, pub changepoint_range: PositiveFloat, pub yearly_seasonality: SeasonalityOption, pub weekly_seasonality: SeasonalityOption, pub daily_seasonality: SeasonalityOption, pub seasonality_mode: FeatureMode, pub seasonality_prior_scale: PositiveFloat, pub changepoint_prior_scale: PositiveFloat, pub estimation: EstimationMode, pub interval_width: IntervalWidth, pub uncertainty_samples: u32, pub scaling: Scaling, pub holidays: HashMap<String, Holiday>, pub holidays_prior_scale: PositiveFloat, pub holidays_mode: Option<FeatureMode>,
}
Expand description

Options for Prophet, after applying defaults.

Fields§

§growth: GrowthType

The type of growth (trend) to use.

Defaults to GrowthType::Linear.

§changepoints: Option<Vec<TimestampSeconds>>

An optional list of changepoints.

If not provided, changepoints will be automatically selected.

§n_changepoints: u32

The number of potential changepoints to include.

Not used if changepoints is provided.

If provided and changepoints is not provided, then n_changepoints potential changepoints will be selected uniformly from the first changepoint_range proportion of the history.

Defaults to 25.

§changepoint_range: PositiveFloat

The proportion of the history to consider for potential changepoints.

Not used if changepoints is provided.

Defaults to 0.8 for the first 80% of the data.

§yearly_seasonality: SeasonalityOption

How to fit yearly seasonality.

Defaults to SeasonalityOption::Auto.

§weekly_seasonality: SeasonalityOption

How to fit weekly seasonality.

Defaults to SeasonalityOption::Auto.

§daily_seasonality: SeasonalityOption

How to fit daily seasonality.

Defaults to SeasonalityOption::Auto.

§seasonality_mode: FeatureMode

How to model seasonality.

Defaults to FeatureMode::Additive.

§seasonality_prior_scale: PositiveFloat

The prior scale for seasonality.

This modulates the strength of seasonality, with larger values allowing the model to fit larger seasonal fluctuations and smaller values dampening the seasonality.

Can be specified for individual seasonalities using Prophet::add_seasonality.

Defaults to 10.0.

§changepoint_prior_scale: PositiveFloat

The prior scale for changepoints.

This modulates the flexibility of the automatic changepoint selection. Large values will allow many changepoints, while small values will allow few changepoints.

Defaults to 0.05.

§estimation: EstimationMode

How to perform parameter estimation.

When EstimationMode::Mle or EstimationMode::Map are used then no MCMC samples are taken.

Defaults to EstimationMode::Mle.

§interval_width: IntervalWidth

The width of the uncertainty intervals.

Must be between 0.0 and 1.0. Common values are 0.8 (80%), 0.9 (90%) and 0.95 (95%).

Defaults to 0.8 for 80% intervals.

§uncertainty_samples: u32

The number of simulated draws used to estimate uncertainty intervals.

Setting this value to 0 will disable uncertainty estimation and speed up the calculation.

Defaults to 1000.

§scaling: Scaling

How to scale the data prior to fitting the model.

Defaults to Scaling::AbsMax.

§holidays: HashMap<String, Holiday>

Holidays to include in the model.

§holidays_prior_scale: PositiveFloat

Prior scale for holidays.

This parameter modulates the strength of the holiday components model, unless overridden in each individual holiday’s input.

Defaults to 100.0.

§holidays_mode: Option<FeatureMode>

How to model holidays.

Defaults to the same value as ProphetOptions::seasonality_mode.

Trait Implementations§

Source§

impl Clone for ProphetOptions

Source§

fn clone(&self) -> ProphetOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ProphetOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ProphetOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl From<OptProphetOptions> for ProphetOptions

Source§

fn from(value: OptProphetOptions) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V