mlpy.learners.ILearner

class mlpy.learners.ILearner(filename=None)[source]

Bases: mlpy.modules.UniqueModule

The learner interface.

Both online and offline learner inherit from this interface.

Parameters:

filename : str, optional

The name of the file to save the learner state to after each iteration. If None is given, the learner state is not saved. Default is None.

Attributes

mid The module’s unique identifier.
type The type of the learner (i.e., online and offline).

Methods

choose_action(state) Choose the next action
execute(experience) Execute learning specific updates.
learn() Learn a policy from the experience.
load(filename) Load the state of the module from file.
reset(t, **kwargs) Reset reinforcement learner.
save(filename) Save the current state of the module to file.