learner
SupervisedLearner
Bases: ABC
Base class for supervised learners.
A supervised learner learns from input-output pairs.
learn(inputs, outputs)
abstractmethod
Learn from the data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs
|
Data
|
The input data. |
required |
outputs
|
Data
|
The output data. |
required |
Returns:
Type | Description |
---|---|
Model
|
The model learned from the data. |
Source code in src/flowcean/core/learner.py
14 15 16 17 18 19 20 21 22 23 24 |
|
SupervisedIncrementalLearner
Bases: ABC
Base class for incremental supervised learners.
An incremental supervised learner learns from input-output pairs incrementally.
learn_incremental(inputs, outputs)
abstractmethod
Learn from the data incrementally.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs
|
Data
|
The input data. |
required |
outputs
|
Data
|
The output data. |
required |
Returns:
Type | Description |
---|---|
Model
|
The model learned from the data. |
Source code in src/flowcean/core/learner.py
34 35 36 37 38 39 40 41 42 43 44 |
|
ActiveLearner
Bases: ABC
Base class for active learners.
Active learners require actions to be taken to learn.
learn_active(action, observation)
abstractmethod
Learn from actions and observations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
action
|
Data
|
The action performed. |
required |
observation
|
Data
|
The observation of the environment. |
required |
Returns:
Type | Description |
---|---|
Model
|
The model learned from the data. |
Source code in src/flowcean/core/learner.py
53 54 55 56 57 58 59 60 61 62 63 |
|
propose_action(observation)
abstractmethod
Propose an action based on an observation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation
|
Data
|
The observation of an environment. |
required |
Returns:
Type | Description |
---|---|
Data
|
The action to perform. |
Source code in src/flowcean/core/learner.py
65 66 67 68 69 70 71 72 73 74 |
|