ljvmiranda921 / pyswarms

A research toolkit for particle swarm optimization in Python
https://pyswarms.readthedocs.io/en/latest/
MIT License
1.26k stars 334 forks source link

Add docs that pyswarms is minimization solver #531

Open yasirroni opened 2 months ago

yasirroni commented 2 months ago

Describe the bug No mention in both codes and docs that pyswarms optimize is minimization.

To Reproduce run example of any maximization problems.

Expected behavior Clear docs that maximization problems needs to be reformulated

Describe alternatives you've considered Support maximization as parameter is optimize

yasirroni commented 2 months ago

Also, docs about the shape of x in this example:

# import modules
import numpy as np

# create a parameterized version of the classic Rosenbrock unconstrained optimzation function
def rosenbrock_with_args(x, a, b, c=0):
    f = (a - x[:, 0]) ** 2 + b * (x[:, 1] - x[:, 0] ** 2) ** 2 + c
    return f

should be clarified.