pub struct LFA<P, A> {
pub projector: P,
pub approximator: A,
}
Expand description
Linear function approximator.
Fields§
§projector: P
§approximator: A
Implementations§
source§impl<P: Space> LFA<P, ScalarFunction>
impl<P: Space> LFA<P, ScalarFunction>
pub fn scalar_output(projector: P) -> Self
source§impl<P: Space> LFA<P, PairFunction>
impl<P: Space> LFA<P, PairFunction>
pub fn pair_output(projector: P) -> Self
source§impl<P: Space> LFA<P, TripleFunction>
impl<P: Space> LFA<P, TripleFunction>
pub fn triple_output(projector: P) -> Self
source§impl<P: Space> LFA<P, VectorFunction>
impl<P: Space> LFA<P, VectorFunction>
pub fn vector_output(projector: P, n_outputs: usize) -> Self
source§impl<P, A: Approximator<Projection>> LFA<P, A>
impl<P, A: Approximator<Projection>> LFA<P, A>
pub fn evaluate_primal(&self, primal: &Projection) -> EvaluationResult<A::Value>
pub fn update_primal(
&mut self,
primal: &Projection,
update: A::Value
) -> UpdateResult<()>
Trait Implementations§
source§impl<I, P, A> Approximator<I> for LFA<P, A>where
I: ?Sized,
P: Projector<I>,
A: Approximator<Projection>,
impl<I, P, A> Approximator<I> for LFA<P, A>where
I: ?Sized,
P: Projector<I>,
A: Approximator<Projection>,
type Value = <A as Approximator<Projection>>::Value
source§fn n_outputs(&self) -> usize
fn n_outputs(&self) -> usize
Return the dimensionality of the output value
Approximator::Value
.source§fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>
fn evaluate(&self, input: &I) -> EvaluationResult<Self::Value>
Evaluate the function and return its value.
source§impl<'de, P, A> Deserialize<'de> for LFA<P, A>where
P: Deserialize<'de>,
A: Deserialize<'de>,
impl<'de, P, A> Deserialize<'de> for LFA<P, A>where
P: Deserialize<'de>,
A: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more