[][src]Trait lfa::core::Approximator

pub trait Approximator: Parameterised {
type Output;
    fn n_outputs(&self) -> usize;
fn evaluate(&self, features: &Features) -> EvaluationResult<Self::Output>;
fn jacobian(&self, features: &Features) -> Matrix<f64>;
fn update_grad(
        &mut self,
        grad: &Matrix<f64>,
        update: Self::Output
    ) -> UpdateResult<()>; fn update(
        &mut self,
        features: &Features,
        update: Self::Output
    ) -> UpdateResult<()> { ... } }

An interface for function approximators.

Associated Types

type Output

The type of value being approximated.

Loading content...

Required methods

fn n_outputs(&self) -> usize

Return the dimensionality of the output value Approximator::Output.

fn evaluate(&self, features: &Features) -> EvaluationResult<Self::Output>

Evaluate the approximator and return its value.

fn jacobian(&self, features: &Features) -> Matrix<f64>

Return the Jacobian matrix df/dw for a given features vector.

Note: we use denominator layout such that rows and columns correspond to weights and outputs, respectively.

fn update_grad(
    &mut self,
    grad: &Matrix<f64>,
    update: Self::Output
) -> UpdateResult<()>

Update the approximator's estimate for a given gradient matrix.

Loading content...

Provided methods

fn update(
    &mut self,
    features: &Features,
    update: Self::Output
) -> UpdateResult<()>

Update the approximator's estimate for the given input.

Loading content...

Implementors

impl Approximator for PairFunction[src]

type Output = [f64; 2]

impl Approximator for ScalarFunction[src]

type Output = f64

impl Approximator for TripleFunction[src]

type Output = [f64; 3]

impl Approximator for VectorFunction[src]

type Output = Vector<f64>

impl<P, E> Approximator for LFA<P, E> where
    E: Approximator
[src]

type Output = E::Output

impl<P, E, T> Approximator for TransformedLFA<P, E, T> where
    E: Approximator,
    T: Transform<E::Output, Output = E::Output>,
    T::Output: ElementwiseMul<T::Output> + IntoVector
[src]

type Output = T::Output

Loading content...