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§
Sourcefn update(
&mut self,
datapoint: &StreamingDataPoint,
) -> Result<(), OptimizeError>
fn update( &mut self, datapoint: &StreamingDataPoint, ) -> Result<(), OptimizeError>
Process a single data point and update parameters
Sourcefn parameters(&self) -> &Array1<f64>
fn parameters(&self) -> &Array1<f64>
Get current parameter estimates
Sourcefn stats(&self) -> &StreamingStats
fn stats(&self) -> &StreamingStats
Get current optimization statistics
Provided Methods§
Sourcefn update_batch(
&mut self,
datapoints: &[StreamingDataPoint],
) -> Result<(), OptimizeError>
fn update_batch( &mut self, datapoints: &[StreamingDataPoint], ) -> Result<(), OptimizeError>
Process a batch of data points