pub struct TiRexModel { /* private fields */ }Implementations§
Source§impl TiRexModel
impl TiRexModel
pub fn load(gguf_path: &Path, config: TiRexConfig) -> Result<Self>
Sourcepub fn forecast(
&self,
context: &[f32],
prediction_length: usize,
) -> Result<(Vec<Vec<f32>>, Vec<f32>)>
pub fn forecast( &self, context: &[f32], prediction_length: usize, ) -> Result<(Vec<Vec<f32>>, Vec<f32>)>
Forecast quantiles and the median for a single time series.
Returns (quantiles, median) where:
quantiles:[prediction_length, num_quantiles]in the config’s quantile ordermedian:[prediction_length](the 0.5 quantile row, for convenience — despite the name this function and callers used historically, it is the median, not a distinct mean statistic)
Trait Implementations§
Source§impl Forecaster for TiRexModel
impl Forecaster for TiRexModel
Source§fn forecast(
&self,
context: &[Vec<f32>],
_mask: &[Vec<bool>],
horizon: usize,
) -> Result<QuantileMatrix>
fn forecast( &self, context: &[Vec<f32>], _mask: &[Vec<bool>], horizon: usize, ) -> Result<QuantileMatrix>
TiRex is univariate-only; mask is unused (missing values aren’t currently
threaded through from the shared JSON envelope).
type Config = TiRexConfig
fn load(gguf_path: &Path, config: TiRexConfig) -> Result<Self>
Auto Trait Implementations§
impl !RefUnwindSafe for TiRexModel
impl !UnwindSafe for TiRexModel
impl Freeze for TiRexModel
impl Send for TiRexModel
impl Sync for TiRexModel
impl Unpin for TiRexModel
impl UnsafeUnpin for TiRexModel
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
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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