Add minimize key to minimize fitness value, rather than maximize

Merged
#1 · Created  · Last updated

Merged pull request

Merged in cjekel/pyfde (pull request #1)

3b4ff5b·Author: ·Closed by: ·2018-05-11

Description

Hey!

Thanks for the great DE library! It's soo fast!

I often want to minimize my objective functions, and use multiple optimization algorithms on the same objective function.

Thus I made a key to minimize the objective function with PyFDE. A description of the changes:

  • Add minimize key to init

  • By default minimize=False

  • Add check in evaluate()for minimize key, if minimize=True the fitness value stored will be multiplied by -1

  • Add assert in init to ensure that minimize is not compatible with batch mode

  • Added minimize key description in the tutorial for documentation

Thanks,
CJ

 


EDIT 2018/05/10

  • Batch and minimize now supported

  • If statement in evaluate checks for minimize

 

0 attachments

0 comments

Loading commits...