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

pub trait Approximator<I: ?Sized> {
    type Value;
    fn n_outputs(&self) -> usize;
fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>;
fn update(&mut self, input: &I, update: Self::Value) -> UpdateResult<()>; fn adapt(
        &mut self,
        new_features: &HashMap<IndexT, IndexSet>
    ) -> AdaptResult<usize> { ... } }

An interface for function approximators.

Associated Types

type Value

Loading content...

Required methods

fn n_outputs(&self) -> usize

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

fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>

Evaluate the function and return its value.

fn update(&mut self, input: &I, update: Self::Value) -> UpdateResult<()>

Update the approximator's estimate for the given input.

Loading content...

Provided methods

fn adapt(
    &mut self,
    new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>

Adapt the approximator in light of newly discovered features.

Loading content...

Implementations on Foreign Types

impl<I: ?Sized, T: Approximator<I>> Approximator<I> for Box<T>[src]

type Value = T::Value

Loading content...

Implementors

impl Approximator<Projection> for PairFunction[src]

type Value = (f64, f64)

impl Approximator<Projection> for ScalarFunction[src]

type Value = f64

impl Approximator<Projection> for TripleFunction[src]

type Value = (f64, f64, f64)

impl Approximator<Projection> for VectorFunction[src]

type Value = Vector<f64>

impl<I: ?Sized, P, E> Approximator<I> for LFA<P, E> where
    P: Projector<I>,
    E: Approximator<Projection>, 
[src]

type Value = E::Value

impl<I: ?Sized, P, E, T> Approximator<I> for TransformedLFA<P, E, T> where
    P: Projector<I>,
    E: Approximator<Projection>,
    T: Transform<E::Value>,
    E::Value: Gradient, 
[src]

type Value = E::Value

Loading content...