offline
learn_offline(environment, learner, inputs, outputs, *, input_transform=None)
Learn from an offline environment.
Learn from an offline environment by learning from the input-output pairs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
environment
|
OfflineEnvironment
|
The offline environment. |
required |
learner
|
SupervisedLearner
|
The supervised learner. |
required |
inputs
|
list[str]
|
The input feature names. |
required |
outputs
|
list[str]
|
The output feature names. |
required |
input_transform
|
Transform | None
|
The transform to apply to the input features. Will be part of the final model. |
None
|
Returns:
Type | Description |
---|---|
Model
|
The model learned from the environment. |
Source code in src/flowcean/strategies/offline.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
evaluate_offline(model, environment, inputs, outputs, metrics)
Evaluate a model on an offline environment.
Evaluate a model on an offline environment by predicting the outputs from the inputs and comparing them to the true outputs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model
|
Model
|
The model to evaluate. |
required |
environment
|
OfflineEnvironment
|
The offline environment. |
required |
inputs
|
list[str]
|
The input feature names. |
required |
outputs
|
list[str]
|
The output feature names. |
required |
metrics
|
list[OfflineMetric]
|
The metrics to evaluate the model with. |
required |
Returns:
Type | Description |
---|---|
Report
|
The evaluation report. |
Source code in src/flowcean/strategies/offline.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
|