[−][src]Type Definition lfa::VectorLFA
type VectorLFA<B, O> = LFA<B, Array2<f64>, O>;
Linear function approximator with vector output.
Implementations
impl<B, O> VectorLFA<B, O>
[src]
pub fn vector(basis: B, optimiser: O, n_outputs: usize) -> Self where
B: Space,
[src]
B: Space,
Construct an VectorLFA
with a chosen number of outputs using a given
basis representation and optimisation routine. The weights are
initialised with a matrix of zeros.
pub fn n_outputs(&self) -> usize
[src]
Return the dimensionality of the output..
pub fn evaluate<I>(&self, input: I) -> Result<Array1<f64>> where
B: Basis<I, Value = Features>,
[src]
B: Basis<I, Value = Features>,
Evaluate the function approximator for a given input
.
pub fn evaluate_index<I>(&self, input: I, index: usize) -> Result<f64> where
B: Basis<I, Value = Features>,
[src]
B: Basis<I, Value = Features>,
Evaluate the i
th output of the function approximator for a given
input
.
pub fn iter<'a, I>(&'a self, input: I) -> OutputIter<'a> where
B: Basis<I, Value = Features>,
[src]
B: Basis<I, Value = Features>,
Iterate sequentially over the outputs of the function approximator for a
given input
.
Panics if the basis computation fails.
pub fn try_iter<'a, I>(&'a self, input: I) -> Result<OutputIter<'a>> where
B: Basis<I, Value = Features>,
[src]
B: Basis<I, Value = Features>,
Iterate sequentially over the outputs of the function approximator for a
given input
.
pub fn update<I, E>(&mut self, input: I, errors: E) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
E: IntoIterator<Item = f64>,
[src]
B: Basis<I, Value = Features>,
O: Optimiser,
E: IntoIterator<Item = f64>,
Update the function approximator for a given input
and error
.
pub fn update_index<I>(
&mut self,
input: I,
index: usize,
error: f64
) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
[src]
&mut self,
input: I,
index: usize,
error: f64
) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
Update the i
th output of the function approximator for a given input
and error
.
pub fn update_with<I>(
&mut self,
input: I,
f: impl Fn(&Features, Array1<f64>) -> Array1<f64>
) -> Result<()> where
B: Basis<I, Value = Features>,
O: Optimiser,
[src]
&mut self,
input: I,
f: impl Fn(&Features, Array1<f64>) -> Array1<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.