resolve_optuna
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.trial.Trial | -- | The Optuna trial object. |
item | BaseOptunaTrial | -- | or Any The parameter or object to resolve. If it has a suggest method, it will be used. |
| Type | Description |
|---|---|
Any | The suggested value if item has a suggest method, otherwise returns item as-is. |
resolve_metric_output
| Name | Type | Default | Description |
|---|---|---|---|
metric | Any | -- | The metric returned by the portfolio pipeline. It can be a float, list, pandas DataFrame, or pandas Series. |
| Type | Description |
|---|---|
int | float | Tuple[int | float, ...] | The resolved metric as a single float or a tuple of floats. If the input is a DataFrame, Series, or list, it is flattened and converted to a tuple of floats. |
| Type | Description |
|---|---|
optuna.TrialPruned | If the metric contains NaN values, is empty, or is None, the trial is pruned. |
BaseOptunaTrial
Ancestors
abc.ABC
Descendants
systematica.portfolio.tuners.utils.Categoricalsystematica.portfolio.tuners.utils.Floatsystematica.portfolio.tuners.utils.Intsystematica.portfolio.tuners.utils.Param
Methods
suggest
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.Trial | -- | The Optuna trial object. |
| Type | Description |
|---|---|
tp.Any | A suggested value for the parameter. |
Float
Ancestors
systematica.portfolio.tuners.utils.BaseOptunaTrialabc.ABC
Instance variables
-
high: float: Upper endpoint of the range of suggested values.highis included in the range.highmust be greater than or equal tolow. -
log: bool: A flag to sample the value from the log domain or not. IflogisTrue, the value is sampled from the range in the log domain. Otherwise, the value is sampled from the range in the linear domain. -
low: float: Lower endpoint of the range of suggested values.lowis included in the range.lowmust be less than or equal tohigh. IflogisTrue,lowmust be larger than 0. -
name: str: A parameter name. -
step: float | None: A step of discretization.
Methods
suggest
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.Trial | -- | The Optuna trial object. |
| Type | Description |
|---|---|
float | A suggested float value. |
Int
Ancestors
systematica.portfolio.tuners.utils.BaseOptunaTrialabc.ABC
Instance variables
-
high: int: Upper endpoint of the range of suggested values.highis included in the range.highmust be greater than or equal tolow. -
log: bool: A flag to sample the value from the log domain or not. Iflogis true, the value is sampled from the range in the log domain. Otherwise, the value is sampled from the range in the linear domain. -
low: int: Lower endpoint of the range of suggested values.lowis included in the range.lowmust be less than or equal tohigh. IflogisTrue,lowmust be larger than 0. -
name: str: A parameter name. -
step: int: A step of discretization.
Methods
suggest
[\mathsf{low}, \mathsf{high}].
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.Trial | -- | The Optuna trial object. |
| Type | Description |
|---|---|
int | A suggested int value. |
Categorical
Ancestors
systematica.portfolio.tuners.utils.BaseOptunaTrialabc.ABC
Instance variables
-
choices: Sequence[bool | int | float | str | None]: Parameter value candidates. -
name: str: A parameter name.
Methods
suggest
choices.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.Trial | -- | The Optuna trial object. |
| Type | Description |
|---|---|
optuna.distributions.CategoricalChoiceType | A suggested categorical value. |
Param
Ancestors
systematica.portfolio.tuners.utils.BaseOptunaTrialabc.ABC
Instance variables
-
choices: Sequence[bool | int | float | str | None]: Parameter value candidates. -
high: int: Upper endpoint of the range of suggested values.highis included in the range.highmust be greater than or equal tolow. -
log: bool: A flag to sample the value from the log domain or not. Iflogis true, the value is sampled from the range in the log domain. Otherwise, the value is sampled from the range in the linear domain. -
low: int: Lower endpoint of the range of suggested values.lowis included in the range.lowmust be less than or equal tohigh. IflogisTrue,lowmust be larger than 0. -
name: str: A parameter name. -
step: int: A step of discretization.
Methods
suggest
| Name | Type | Default | Description |
|---|---|---|---|
trial | optuna.Trial | -- | The Optuna trial object. |
| Type | Description |
|---|---|
int | float | optuna.distributions.CategoricalChoiceType | A suggested value. |

