mlpy.mdp.continuous.casml.CbVRevisionMethod

class mlpy.mdp.continuous.casml.CbVRevisionMethod(owner)[source]

Bases: mlpy.knowledgerep.cbr.methods.IRevisionMethod

The revision method for the value case base implementation for CASML.

The solutions provided by the query case is evaluated and information about whether the solution has or has not provided a desired outcome is gathered.

Parameters:

owner : CaseBase

A pointer to the owning case base.

Notes

The CASML revision method for the value case base revises the state value v_k associated with each nearest neighbor c_{V,k} \in \text{kNN}:(V, c_V) to its contribution to the error in estimating the value of v_{i-1}:

v_k += \alpha(r_{i-1} + \gamma v_i - v_k) * \frac{K(d(c_{V, i}, c_{V, k}))}{\sum_{c_{V, j} \in k\text{NN}(V, c_v)} K(d(c_{V, j}, c_{V, j}))}

where v_k is the value associated with neighbor math:c_{V, k}, \alpha (0 \le \alpha \le 1) is the learning rate, \gamma (0 \le \gamma \le 1) is a geometric discount factor, and Gaussian kernel function K(d) = exp(-d^2) determines the relative contribution of the k-nearest neighbors.

Methods

execute(case, case_matches) Execute the revision step.
plot_data(case, case_matches) Plot the data.