finol.optimization_layer.OptimizerSelector

class finol.optimization_layer.OptimizerSelector(model)[source]

Class to select optimizer for portfolio selection.

Methods

select_optimizer([sampled_lr, sampled_optimizer])

Selects an optimizer based on the configuration.

select_optimizer(sampled_lr=None, sampled_optimizer=None)[source]

Selects an optimizer based on the configuration.

Parameters:
  • sampled_lr (Optional[Dict[str, Any]]) – Sampled learning rate or None. Required only when optimizing the learning rate selection.

  • sampled_optimizer (Optional[Dict[str, Any]]) – Sampled optimizer or None. Required only when optimizing the optimizer selection.

Returns:

The selected optimizer for the model.

Raises:

ValueError – If the optimizer name is invalid.

Return type:

object