finol.optimization_layer.OptimizerSelector¶
- class finol.optimization_layer.OptimizerSelector(model)[源代码]¶
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)[源代码]¶
Selects an optimizer based on the configuration.
- 参数:
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.
- 返回:
The selected optimizer for the model.
- 抛出:
ValueError – If the optimizer name is invalid.
- 返回类型:
object