mlpy.mdp.continuous.casml.CASMLRetentionMethod

class mlpy.mdp.continuous.casml.CASMLRetentionMethod(tau=None, sigma=None, plot_retention=None)[source]

Bases: mlpy.knowledgerep.cbr.methods.IRetentionMethod

The retention method implementation for CASML.

When the new problem-solving experience can be stored or not stored in memory, depending on the revision outcomes and the CBR policy regarding case retention.

Parameters:

tau : float, optional

The maximum permitted error when comparing most similar solution. Default is 0.8.

sigma : float, optional

The maximum permitted error when comparing actual with estimated transitions. Default is 0.2

plot_retention : bool, optional

Whether to plot the data during the retention step or not. Default is False.

Notes

The CASML retention method considers query cases as predicted correctly if

  1. the query case is within the maximum permitted error \tau of the most similar solution case:

    d(\text{case}, 1\text{NN}(C_T, \text{case})) < \tau

  2. the difference between the actual and the estimated transitions are less than the permitted error \sigma:

    d(\text{case}.\Delta_\text{state}, T(s_{i-1}, a_{i-1}) < \sigma

Methods

execute(case, case_matches[, fn_add]) Execute the retention step.
plot_data(case, case_matches, **kwargs) Plot the data during the retention step.