Struct lfa::approximators::ScalarFunction
source · Expand description
Weight-Projection
evaluator with scalar f64
output.
Fields§
§weights: Vector<f64>
Implementations§
Trait Implementations§
source§impl Approximator<Projection> for ScalarFunction
impl Approximator<Projection> for ScalarFunction
type Value = f64
source§fn n_outputs(&self) -> usize
fn n_outputs(&self) -> usize
Return the dimensionality of the output value
Approximator::Value
.source§fn evaluate(&self, p: &Projection) -> EvaluationResult<f64>
fn evaluate(&self, p: &Projection) -> EvaluationResult<f64>
Evaluate the function and return its value.
source§fn update(&mut self, p: &Projection, error: f64) -> UpdateResult<()>
fn update(&mut self, p: &Projection, error: f64) -> UpdateResult<()>
Update the approximator’s estimate for the given input.
source§impl Clone for ScalarFunction
impl Clone for ScalarFunction
source§fn clone(&self) -> ScalarFunction
fn clone(&self) -> ScalarFunction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for ScalarFunction
impl<'de> Deserialize<'de> for ScalarFunction
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