pub struct QuantileForecast {
pub timestamps: Vec<i64>,
pub point: Vec<f64>,
pub levels: Vec<f64>,
pub quantiles: Vec<Vec<f64>>,
pub calibration_counts: Vec<usize>,
}Expand description
A per-horizon set of predicted quantiles.
Fields§
§timestamps: Vec<i64>Timestamps of the forecast points (nanoseconds).
point: Vec<f64>Point forecast from the underlying model, one per horizon step.
levels: Vec<f64>Requested quantile levels, ascending.
quantiles: Vec<Vec<f64>>quantiles[i][h] is the levels[i] quantile at horizon step h.
calibration_counts: Vec<usize>Number of residuals backing each horizon step’s calibration.
Small counts mean wide sampling error in the quantile estimate; the caller can use this to decide whether to trust a given horizon.
Implementations§
Source§impl QuantileForecast
impl QuantileForecast
Sourcepub fn level(&self, level: f64) -> Option<&[f64]>
pub fn level(&self, level: f64) -> Option<&[f64]>
Values for level, if it was among the requested levels.
Matched with a small tolerance rather than exactly: levels are
routinely derived arithmetically ((1.0 - 0.9) / 2.0 is
0.049999999999999996, not 0.05), so exact f64 equality would
fail for the very levels QuantileConfig::central produces.
Trait Implementations§
Source§impl Clone for QuantileForecast
impl Clone for QuantileForecast
Source§fn clone(&self) -> QuantileForecast
fn clone(&self) -> QuantileForecast
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for QuantileForecast
impl Debug for QuantileForecast
Source§impl<'de> Deserialize<'de> for QuantileForecast
impl<'de> Deserialize<'de> for QuantileForecast
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QuantileForecast
impl RefUnwindSafe for QuantileForecast
impl Send for QuantileForecast
impl Sync for QuantileForecast
impl Unpin for QuantileForecast
impl UnsafeUnpin for QuantileForecast
impl UnwindSafe for QuantileForecast
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
Mutably borrows from an owned value. Read more
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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 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> ⓘ
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