Comments (2)
Thanks for your help
from pymoo.
Yes, this is possible. The algorithm is terminated when progress (which is returned by _update
) equals 1.0
. If you don't care about the progress made you can simply return 0.0
if above your value and 1.0
if equal or below.
from pymoo.algorithms.soo.nonconvex.de import DE
from pymoo.core.termination import Termination
from pymoo.optimize import minimize
from pymoo.problems.single import Sphere
problem = Sphere()
algorithm = DE()
class MyTermination(Termination):
def __init__(self, value) -> None:
super().__init__()
self.value = value
def _update(self, algorithm):
f_min = algorithm.opt.get("f").min()
return 1.0 if f_min <= self.value else 0.0
termination = MyTermination(0.01)
res = minimize(problem,
algorithm,
termination=termination,
seed=1,
verbose=True)
print(f"Best solution found: \nX = {res.X}\nF = {res.F}\nCV= {res.CV}")
from pymoo.
Related Issues (20)
- Python-3.12 wheels HOT 1
- Tutorial with logist regression HOT 2
- MOPSO Implementation HOT 2
- Tutorial Mixed optimization with NSGA-II HOT 6
- annoying virustotal HOT 4
- Pareto front HOT 2
- Is there a way to couple two inputs? HOT 1
- Welded beam test problem Pareto front contains dominated solutions HOT 4
- Multi-objective Particle Swarm Optimization in Pymoo?
- issue with resuming from checkpoint HOT 4
- SPX is not correctly implemented HOT 1
- Is fast_best_order_sort intended to be usable by NonDominatedSorting? HOT 1
- RVEA not reaching specified number of evaluations HOT 6
- Encountered problems while using pymoo parallelization, hoping to seek help HOT 2
- ModuleNotFoundError: No module named 'optuna' HOT 1
- AssertionError: This implementation of MOEAD does not support any constraints. HOT 1
- Expose algorithm.data HOT 1
- Hello, can hyperparameter optimization be done for multi-objective problems? HOT 1
- 超参数优化HyperparameterProblem HOT 1
- Optimisation parameters for integer types HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymoo.