DifferentialEvolution: custom mutation and recombination functions?

Karen Róbertsdóttir <[email protected]> Mon, 14 Aug 2023 21:59:57 +0000
Newsgroups gmane.comp.python.scientific.devel
Message-ID <CAN=yiRxTMbOmzPFgc-+HiP9GU=VxpGiNTOJeBGLdPFdMNAQ0BA@mail.gmail.com>
Hi - newbie here, my apologies for any ignorance here!

It is my understanding that scipy has no ability for the user to specify
custom mutation or recombination functions, or any sort of manual
alteration of new population members at all - correct?

If so: are there any plans to introduce such a thing?

If not: would there be interest in it?  It's among the most trivial of all
possible feature additions - just adding in ",
mutation_fn=<current_scipy_mutation_fn>,
recombination_fn=<current_scipy_recombination_fn>" to
scipy.optimize.differential_evolution, updating the docs, and writing test
functions that just return a string of 1s, then printing the input provided
to the minimize function, which should eventually turn into all 1s.

Use case: the user knows far more about what their data "means" than scipy
will ever know. Including when a change in one place implies changes in
another, how various factors ahould impact new values, etc.

A particularly useful case is where the data represents a string of
"genes", where duplication is not inherently deleterious. One of natural
evolution's most powerful features is gene duplication followed by genetic
drift of the copies, with their functionality diverging: the original
function is retained while a new function is created. But scipy's stock
mutation and recombination functions can't duplicate, shift around, or
match up genes.  A user however could readily provide such a function. I'm
currently dealing with such a case (geometry optimization - each cluster of
floats represents how a new element attaches to a mesh)

If there are no plans to implement it, I might (or might not, depending) be
able to find the time to do so.  Though I know 98% of the time required
would not be coding / testing, but rather figuring out how to setup and
develop for the scipy test environment and figuring out how to contribute
the changes - so it would be easier if an existing dev could just be
bothered to add  ", mutation_fn=<current_scipy_mutation_fn>,
recombination_fn=<current_scipy_recombination_fn>"   :)

Anyway, sorry to bother you all!

 - kv, Karen

_______________________________________________
SciPy-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/scipy-dev.python.org/
Member address: [email protected]