StreamingOptimizer

Trait StreamingOptimizer 

Source
pub trait StreamingOptimizer {
    // Required methods
    fn update(
        &mut self,
        datapoint: &StreamingDataPoint,
    ) -> Result<(), OptimizeError>;
    fn parameters(&self) -> &Array1<f64>;
    fn stats(&self) -> &StreamingStats;
    fn reset(&mut self);

    // Provided methods
    fn update_batch(
        &mut self,
        datapoints: &[StreamingDataPoint],
    ) -> Result<(), OptimizeError> { ... }
    fn converged(&self) -> bool { ... }
}
Expand description

Trait for streaming optimization algorithms

Required Methods§

Source

fn update( &mut self, datapoint: &StreamingDataPoint, ) -> Result<(), OptimizeError>

Process a single data point and update parameters

Source

fn parameters(&self) -> &Array1<f64>

Get current parameter estimates

Source

fn stats(&self) -> &StreamingStats

Get current optimization statistics

Source

fn reset(&mut self)

Reset the optimizer state

Provided Methods§

Source

fn update_batch( &mut self, datapoints: &[StreamingDataPoint], ) -> Result<(), OptimizeError>

Process a batch of data points

Source

fn converged(&self) -> bool

Check if the optimizer has converged

Implementors§