[−][src]Type Definition lfa::ScalarLFA
type ScalarLFA<B, O> = LFA<B, Array1<f64>, O>;
Linear function approximator with scalar output.
Implementations
impl<B, O> ScalarLFA<B, O>
[src]
pub fn scalar(basis: B, optimiser: O) -> Self where
B: Space,
[src]
B: Space,
Construct an ScalarLFA
using a given basis representation and
optimisation routine. The weights are initialised with a vector of
zeros.
pub fn evaluate<I>(&self, input: I) -> Result<f64> where
B: Basis<I, Value = Features>,
[src]
B: Basis<I, Value = Features>,
Evaluate the function approximator for a given input
.
pub fn update<I>(&mut self, input: I, error: f64) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
[src]
B: Basis<I, Value = Features>,
O: Optimiser,
Update the function approximator for a given input
and error
.
pub fn update_with<I>(
&mut self,
input: I,
f: impl Fn(&Features, f64) -> f64
) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
[src]
&mut self,
input: I,
f: impl Fn(&Features, f64) -> f64
) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
Update the function approximator for a given input
, deferring the
error computation to a closure provided by the user.