[−][src]Trait lfa::core::Approximator
An interface for function approximators.
Associated Types
type Value
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.
Provided methods
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
Adapt the approximator in light of newly discovered features.
Implementations on Foreign Types
impl<I: ?Sized, T: Approximator<I>> Approximator<I> for Box<T>
[src]
type Value = T::Value
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>
[src]
fn update(&mut self, input: &I, update: Self::Value) -> UpdateResult<()>
[src]
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
Implementors
impl Approximator<Projection> for PairFunction
[src]
type Value = (f64, f64)
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, p: &Projection) -> EvaluationResult<(f64, f64)>
[src]
fn update(&mut self, p: &Projection, errors: (f64, f64)) -> UpdateResult<()>
[src]
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
impl Approximator<Projection> for ScalarFunction
[src]
type Value = f64
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, p: &Projection) -> EvaluationResult<f64>
[src]
fn update(&mut self, p: &Projection, error: f64) -> UpdateResult<()>
[src]
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
impl Approximator<Projection> for TripleFunction
[src]
type Value = (f64, f64, f64)
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, p: &Projection) -> EvaluationResult<(f64, f64, f64)>
[src]
fn update(
&mut self,
p: &Projection,
errors: (f64, f64, f64)
) -> UpdateResult<()>
[src]
&mut self,
p: &Projection,
errors: (f64, f64, f64)
) -> UpdateResult<()>
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
impl Approximator<Projection> for VectorFunction
[src]
type Value = Vector<f64>
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, p: &Projection) -> EvaluationResult<Vector<f64>>
[src]
fn update(&mut self, p: &Projection, errors: Vector<f64>) -> UpdateResult<()>
[src]
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
impl<I: ?Sized, P, E> Approximator<I> for LFA<P, E> where
P: Projector<I>,
E: Approximator<Projection>,
[src]
P: Projector<I>,
E: Approximator<Projection>,
type Value = E::Value
fn n_outputs(&self) -> usize
[src]
fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>
[src]
fn update(&mut self, input: &I, update: Self::Value) -> UpdateResult<()>
[src]
fn adapt(
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
[src]
&mut self,
new_features: &HashMap<IndexT, IndexSet>
) -> AdaptResult<usize>
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]
P: Projector<I>,
E: Approximator<Projection>,
T: Transform<E::Value>,
E::Value: Gradient,