Abstract encoder
smac.runhistory.encoder.abstract_encoder
#
AbstractRunHistoryEncoder
#
AbstractRunHistoryEncoder(
scenario: Scenario,
considered_states: list[StatusType] = None,
lower_budget_states: list[StatusType] = None,
scale_percentage: int = 5,
seed: int | None = None,
)
Abstract class for preparing data in order to train a surrogate model.
| PARAMETER | DESCRIPTION |
|---|---|
scenario
|
TYPE:
|
considered_states
|
Trials with the passed states are considered.
TYPE:
|
lower_budget_states
|
Additionally consider all trials with these states for budget < current budget.
TYPE:
|
scale_percentage
|
Scaled y-transformation use a percentile to estimate distance to optimum. Only used in some sub-classes.
TYPE:
|
seed
|
TYPE:
|
| RAISES | DESCRIPTION |
|---|---|
TypeError
|
If no success states are given. |
Source code in smac/runhistory/encoder/abstract_encoder.py
meta
property
#
Returns the meta-data of the created object.
| RETURNS | DESCRIPTION |
|---|---|
dict[str, Any]: meta-data of the created object: name, considered states, lower budget
|
|
states, scale_percentage, seed.
|
|
multi_objective_algorithm
property
writable
#
multi_objective_algorithm: (
AbstractMultiObjectiveAlgorithm | None
)
The multi objective algorithm used to transform the data.
get_configurations
#
Returns vector representation of the configurations.
Warning
Instance features are not appended and cost values are not taken into account.
| PARAMETER | DESCRIPTION |
|---|---|
budget_subset
|
List of budgets to consider.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
configs_array
|
TYPE:
|
Source code in smac/runhistory/encoder/abstract_encoder.py
transform
#
Returns a vector representation of the RunHistory.
| PARAMETER | DESCRIPTION |
|---|---|
budget_subset
|
List of budgets to consider.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
X
|
Configuration vector and instance features.
TYPE:
|
Y
|
Cost values.
TYPE:
|