From 9dd69c11a764bbbd74697389bea891c4715c819c Mon Sep 17 00:00:00 2001 From: Teytaud Date: Tue, 27 Aug 2024 15:52:15 +0200 Subject: [PATCH 1/2] Add surrogate models on Discrete Lognormal --- nevergrad/optimization/optimizerlib.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nevergrad/optimization/optimizerlib.py b/nevergrad/optimization/optimizerlib.py index 470451145..e73558355 100644 --- a/nevergrad/optimization/optimizerlib.py +++ b/nevergrad/optimization/optimizerlib.py @@ -2135,6 +2135,12 @@ def __init__( RFMetaModelOnePlusOne = ParametrizedMetaModel(multivariate_optimizer=OnePlusOne, algorithm="rf").set_name( "RFMetaModelOnePlusOne", register=True ) +RFMetaModelLogNormal = ParametrizedMetaModel(multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="rf").set_name( + "RFMetaModelLogNormal", register=True +) +NeuralMetaModelLogNormal = ParametrizedMetaModel(multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="neural").set_name( + "NeuralMetaModelLogNormal", register=True +) MetaModelPSO = ParametrizedMetaModel(multivariate_optimizer=PSO).set_name("MetaModelPSO", register=True) RFMetaModelPSO = ParametrizedMetaModel(multivariate_optimizer=PSO, algorithm="rf").set_name( "RFMetaModelPSO", register=True From 1cb14cefb612a338f8bf496acf927742676527a4 Mon Sep 17 00:00:00 2001 From: Olivier Teytaud Date: Wed, 28 Aug 2024 13:14:54 +0200 Subject: [PATCH 2/2] black --- nevergrad/optimization/optimizerlib.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nevergrad/optimization/optimizerlib.py b/nevergrad/optimization/optimizerlib.py index e73558355..d277c5fc5 100644 --- a/nevergrad/optimization/optimizerlib.py +++ b/nevergrad/optimization/optimizerlib.py @@ -2135,12 +2135,12 @@ def __init__( RFMetaModelOnePlusOne = ParametrizedMetaModel(multivariate_optimizer=OnePlusOne, algorithm="rf").set_name( "RFMetaModelOnePlusOne", register=True ) -RFMetaModelLogNormal = ParametrizedMetaModel(multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="rf").set_name( - "RFMetaModelLogNormal", register=True -) -NeuralMetaModelLogNormal = ParametrizedMetaModel(multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="neural").set_name( - "NeuralMetaModelLogNormal", register=True -) +RFMetaModelLogNormal = ParametrizedMetaModel( + multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="rf" +).set_name("RFMetaModelLogNormal", register=True) +NeuralMetaModelLogNormal = ParametrizedMetaModel( + multivariate_optimizer=LognormalDiscreteOnePlusOne, algorithm="neural" +).set_name("NeuralMetaModelLogNormal", register=True) MetaModelPSO = ParametrizedMetaModel(multivariate_optimizer=PSO).set_name("MetaModelPSO", register=True) RFMetaModelPSO = ParametrizedMetaModel(multivariate_optimizer=PSO, algorithm="rf").set_name( "RFMetaModelPSO", register=True