pub struct MultivariateForecastResult {
pub timestamps: Vec<i64>,
pub series: Vec<String>,
pub predictions: Vec<Vec<f64>>,
pub target: String,
pub predictor_importance: Vec<(String, f64)>,
}Expand description
Result of a multivariate forecast.
Fields§
§timestamps: Vec<i64>Forecast timestamps (nanoseconds since epoch).
series: Vec<String>The series each row of predictions belongs to, in the same order.
This exists because the two implementors of
MultivariateForecastModel return different numbers of rows for
the same call, and nothing used to say so.
MultiLinearRegression is many-predictors-to-one-target and returns
one row; VarModel fits every equation of the system and returns one
row per series. A caller reaching for predictions[0] therefore got
the requested series from one and series index 0 from the other — a
plausible number belonging to a different series, with nothing in the
type to catch it.
predictions: Vec<Vec<f64>>Predicted values, one row per entry of series.
target: StringThe series named by target_idx at fit.
Prefer target_forecast to indexing
predictions directly.
predictor_importance: Vec<(String, f64)>Per-predictor importance / coefficients.
Implementations§
Source§impl MultivariateForecastResult
impl MultivariateForecastResult
Sourcepub fn for_series(&self, name: &str) -> Option<&[f64]>
pub fn for_series(&self, name: &str) -> Option<&[f64]>
The forecast for one named series, if this model produced it.
Sourcepub fn target_forecast(&self) -> Option<&[f64]>
pub fn target_forecast(&self) -> Option<&[f64]>
The forecast for the series the caller asked fit for.
Correct for every implementor, which is the point: it is what
predictions[0] was reached for and only sometimes was.
Trait Implementations§
Source§impl Clone for MultivariateForecastResult
impl Clone for MultivariateForecastResult
Source§fn clone(&self) -> MultivariateForecastResult
fn clone(&self) -> MultivariateForecastResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for MultivariateForecastResult
impl RefUnwindSafe for MultivariateForecastResult
impl Send for MultivariateForecastResult
impl Sync for MultivariateForecastResult
impl Unpin for MultivariateForecastResult
impl UnsafeUnpin for MultivariateForecastResult
impl UnwindSafe for MultivariateForecastResult
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more