[−][src]Trait vikos::Model
A parameterized expert algorithm
Implementations of this trait can be found in models
Associated Types
type Features
Input from which to predict the target
type Target
f64 for Regressors or binary classifiers. For multi classification an array of f64
with a
dimension equal to the number of classes.
Required methods
fn num_coefficients(&self) -> usize
The number of internal coefficients this model depends on
fn coefficient(&mut self, coefficient: usize) -> &mut f64
Mutable reference to the n-th coefficient
fn predict(&self, _: &Self::Features) -> Self::Target
Predicts a target for the inputs based on the internal coefficients
fn gradient(&self, coefficient: usize, input: &Self::Features) -> Self::Target
Value predict derived by the n-th coefficient
at input
Implementations on Foreign Types
impl Model for f64
[src]
impl Model for f64
type Features = ()
type Target = f64
fn num_coefficients(&self) -> usize | [src] |
fn coefficient(&mut self, coefficient: usize) -> &mut f64 | [src] |
fn predict(&self, _: &()) -> f64 | [src] |
fn gradient(&self, coefficient: usize, _: &()) -> f64 | [src] |
Implementors
impl<T> Model for OneVsRest<T> where
T: Array,
T::Element: Model<Target = f64>,
[src]
impl<T> Model for OneVsRest<T> where
T: Array,
T::Element: Model<Target = f64>,
type Features = <T::Element as Model>::Features
type Target = T::Vector
fn num_coefficients(&self) -> usize | [src] |
fn coefficient(&mut self, index: usize) -> &mut f64 | [src] |
fn predict(&self, input: &Self::Features) -> Self::Target | [src] |
fn gradient(&self, coefficient: usize, input: &Self::Features) -> Self::Target | [src] |
impl<V> Model for Linear<V> where
V: Vector,
[src]
impl<V> Model for Linear<V> where
V: Vector,
type Features = V
type Target = f64
fn num_coefficients(&self) -> usize | [src] |
fn coefficient(&mut self, coefficient: usize) -> &mut f64 | [src] |
fn predict(&self, input: &V) -> f64 | [src] |
fn gradient(&self, coefficient: usize, input: &V) -> f64 | [src] |
impl<V> Model for Logistic<V> where
Linear<V>: Model<Features = V, Target = f64>,
[src]
impl<V> Model for Logistic<V> where
Linear<V>: Model<Features = V, Target = f64>,
type Features = V
type Target = f64
fn num_coefficients(&self) -> usize | [src] |
fn coefficient(&mut self, coefficient: usize) -> &mut f64 | [src] |
fn predict(&self, input: &V) -> f64 | [src] |
fn gradient(&self, coefficient: usize, input: &V) -> f64 | [src] |
impl<V, F, Df> Model for GeneralizedLinearModel<V, F, Df> where
F: Fn(f64) -> f64,
Df: Fn(f64) -> f64,
Linear<V>: Model<Features = V, Target = f64>,
[src]
impl<V, F, Df> Model for GeneralizedLinearModel<V, F, Df> where
F: Fn(f64) -> f64,
Df: Fn(f64) -> f64,
Linear<V>: Model<Features = V, Target = f64>,