pub struct LastValueRegressor { /* private fields */ }Expand description
A regressor that always predicts the last observed target.
Implementations§
Source§impl LastValueRegressor
impl LastValueRegressor
Sourcepub fn new(config: BaselineConfig) -> Result<Self, RillError>
pub fn new(config: BaselineConfig) -> Result<Self, RillError>
Create a new last-value regressor.
Sourcepub const fn last_value(&self) -> Option<f64>
pub const fn last_value(&self) -> Option<f64>
The last observed target, if any.
Trait Implementations§
Source§impl Clone for LastValueRegressor
impl Clone for LastValueRegressor
Source§fn clone(&self) -> LastValueRegressor
fn clone(&self) -> LastValueRegressor
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 LastValueRegressor
impl Debug for LastValueRegressor
Source§impl Default for LastValueRegressor
impl Default for LastValueRegressor
Source§impl OnlineRegressor for LastValueRegressor
impl OnlineRegressor for LastValueRegressor
Source§fn feature_count(&self) -> usize
fn feature_count(&self) -> usize
The number of features the model expects.
Source§fn samples_seen(&self) -> u64
fn samples_seen(&self) -> u64
How many training samples the model has seen so far.
Source§fn predict(&self, _features: &[f64]) -> Result<f64, RillError>
fn predict(&self, _features: &[f64]) -> Result<f64, RillError>
Predict the target for the given feature slice. Read more
Auto Trait Implementations§
impl Freeze for LastValueRegressor
impl RefUnwindSafe for LastValueRegressor
impl Send for LastValueRegressor
impl Sync for LastValueRegressor
impl Unpin for LastValueRegressor
impl UnsafeUnpin for LastValueRegressor
impl UnwindSafe for LastValueRegressor
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