Trait multistochgrad::types::Summation
source · pub trait Summation<D: Dimension>: Function<D> {
// Required methods
fn terms(&self) -> usize;
fn term_value(&self, position: &Array<f64, D>, term: usize) -> f64;
// Provided method
fn partial_value(&self, position: &Array<f64, D>, terms: &[usize]) -> f64 { ... }
}
Expand description
Defines a summation of individual functions, i.e., f(x) = ∑ᵢ fᵢ(x).
Required Methods§
Provided Methods§
Implementors§
impl Summation<Dim<[usize; 1]>> for SSE<Ix1>
impl Summation<Dim<[usize; 2]>> for LogisticRegression
We implement the trait Summation using 2 dimensional Arrays. We use the variable coefficients : Array2<f64> so that a row is coefficient array corresponding to (1 augmented) observations and a column is coefficients by class. Recall that ndarray is by default with C storage (row oriented)