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
end(*args, **kwargs) End the episode.
init() Initialize the learner.
learn(*args, **kwargs) Learn a policy from the experience.
load(filename) Load the state of the module from file.
save(filename) Save the current state of the module to file.
start() Start an episode.
step(experience) Execute learning specific updates.