From 20895305c3af878e0ac0bc1c2feb8d40d5f4a1e9 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Thu, 19 Oct 2023 15:46:54 +0900 Subject: [PATCH 1/3] Revise the comment to describe study instance --- quadratic_simple_constraint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quadratic_simple_constraint.py b/quadratic_simple_constraint.py index 60590925..dfb6a9fc 100644 --- a/quadratic_simple_constraint.py +++ b/quadratic_simple_constraint.py @@ -28,7 +28,7 @@ def constraints(trial): if __name__ == "__main__": - # We minimize obj1 and maximize obj2. + # Let us minimize the objective function with soft constraint above. sampler = optuna.samplers.TPESampler(constraints_func=constraints) study = optuna.create_study(sampler=sampler) study.optimize(objective, n_trials=500, timeout=1) From a5fb4ecc81baf092d743bee84cf51813ab60b914 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Thu, 19 Oct 2023 15:54:29 +0900 Subject: [PATCH 2/3] Fix typo --- quadratic_simple_constraint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quadratic_simple_constraint.py b/quadratic_simple_constraint.py index dfb6a9fc..9c08e9b5 100644 --- a/quadratic_simple_constraint.py +++ b/quadratic_simple_constraint.py @@ -28,7 +28,7 @@ def constraints(trial): if __name__ == "__main__": - # Let us minimize the objective function with soft constraint above. + # Let us minimize the objective function with soft constraints above. sampler = optuna.samplers.TPESampler(constraints_func=constraints) study = optuna.create_study(sampler=sampler) study.optimize(objective, n_trials=500, timeout=1) From bcad6a27ba0a9dd03ce2514a5ac6a0f15c7b3e19 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Thu, 19 Oct 2023 15:55:08 +0900 Subject: [PATCH 3/3] Replace - with * for the consistency of markdown list --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6088e896..e790e0f8 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ The examples below provide codeblocks similar to the example above for various d ### Simple Black-box Optimization * [Quadratic function](./quadratic_simple.py) -- [Quadratic multi-objective function](./multi_objective/quadratic_simple.py) -- [Quadratic function with constraints](./quadratic_simple_constraint.py) +* [Quadratic multi-objective function](./multi_objective/quadratic_simple.py) +* [Quadratic function with constraints](./quadratic_simple_constraint.py) ### Examples with ML Libraries