Struct renforce::util::approx::VLinear [] [src]

pub struct VLinear<F: Float + Debug, S: Space> { /* fields omitted */ }

Represents a linear function approximator f(x) = wT g(x) + b where g: S -> Rn maps states to a vector of features Weights updated using squared error cost C = 1/2(wT g(x) + b - y)2

Methods

impl<F: Float + Debug, S: Space> VLinear<F, S>
[src]

Creates a new Linear V-Function Approximator

Creates a new Linear V-Function Approximator with the given features

Adds the specified feature to the end of the feature vector, giving it a random weight

Trait Implementations

impl<F: Debug + Float + Debug, S: Debug + Space> Debug for VLinear<F, S>
[src]

Formats the value using the given formatter.

impl<F: Clone + Float + Debug, S: Clone + Space> Clone for VLinear<F, S>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F: Float + Debug, S: Space> VFunction<S> for VLinear<F, S>
[src]

Evaluate the function on the given state

Update the function using the given information (alpha is learning rate)

impl<F: Float + Debug, S: Space> ParameterizedFunc<F> for VLinear<F, S>
[src]

Returns number of parameters used by the function

Returns the parameters used by the function

Changes the parameters used by the function

impl<S: Space, A: Space, F: Float + Debug> FeatureExtractor<S, A, F> for VLinear<F, S>
[src]

Number of features that can be calculated

Vector containg the values of all the features for this state

impl<S: Space, A: Space, F: Float + Debug> DifferentiableFunc<S, A, F> for VLinear<F, S>
[src]

Calculates the gradient of the output with respect to this function's parameters

Calculates the result of calling function on given input

impl<S: Space> Default for VLinear<f64, S>
[src]

Creates a new Linear V-Function Approximator