#[non_exhaustive]pub enum Error {
Show 18 variants
MismatchedLengths {
a: usize,
b: usize,
a_name: String,
b_name: String,
},
NotEnoughData,
OptimizationFailed(String),
InvalidIntervalWidth(f64),
TooManyDataPoints(usize),
TimestampsAreConstant(TimestampSeconds),
DuplicateSeasonality(String),
InfiniteValue {
column: String,
},
NaNValue {
column: String,
},
MissingRegressor(String),
MissingSeasonalityCondition(String),
AbsMaxScalingFailed,
MissingCap,
MissingFloor,
CapNotGreaterThanFloor,
ChangepointsOutOfRange,
ModelNotFit,
UnableToInferFrequency(Vec<TimestampSeconds>),
}Expand description
Errors that can occur when using the Prophet forecasting algorithm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MismatchedLengths
The data provided had mismatched column lengths.
Fields
NotEnoughData
Not enough data was provided to fit the model.
OptimizationFailed(String)
Optimization failed for some reason.
InvalidIntervalWidth(f64)
An invalid interval width was passed.
The interval width must be between 0.0 and 1.0.
TooManyDataPoints(usize)
Too many data points were provided, overflowing an i32.
TimestampsAreConstant(TimestampSeconds)
The timestamps provided are constant.
DuplicateSeasonality(String)
The same seasonality was added to the model twice.
InfiniteValue
A column contained an infinite value.
NaNValue
A column contained a NaN value.
MissingRegressor(String)
A regressor was added to the model but missing from the data.
MissingSeasonalityCondition(String)
A seasonality in the model was marked as conditional but the condition column was missing from the data.
AbsMaxScalingFailed
AbsMax scaling failed because the min and max were the same.
MissingCap
The cap column for logistic growth was missing.
MissingFloor
The floor column for logistic growth was missing.
CapNotGreaterThanFloor
The cap was not always greater than the floor.
ChangepointsOutOfRange
One or more of the provided changepoints were out of the range of the training data.
ModelNotFit
The Prophet model has not yet been fit.
Fit the model first using Prophet::fit.
UnableToInferFrequency(Vec<TimestampSeconds>)
It was not possible to infer the frequency of the dates.
This can happen if the dates are not evenly spaced, and there is no frequency that appears more often than others.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
impl ModelError for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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> 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.