Skip to content

Commit

Permalink
Fixed probe page. Added min/max semantics for common problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
markcoletti committed Nov 16, 2023
1 parent abbd78f commit 169a9b7
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
0.9
Robert Patton for being a documentation guinea pig. Documentation added for probes and min()/max() for minimization problems.

0.8.1
Lucas McCombs for improvements to crossover operators, parent/offspring tracking, plotting, and more.

0.8
Expand Down
24 changes: 24 additions & 0 deletions docs/source/common_problems.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ Common Problems

Here we address common problems that may arise when using LEAP.

`min()` returns the worst individual for minimization problems
--------------------------------------------------------------

`min()` and `max()` works the opposite you may expect for minimization problems
because the `<` operator has been overriden to consider fitness scalars that are
numerically less than than another to be "better". So `min()` takes into consideration
the problem semantics not the raw number values.

E.g., for a given minimization problem:

.. code-block:: python
min(parents).fitness
Out[2]: 66.49057507514954
max(parents).fitness
Out[3]: 59.87865996360779
The above shows that the value `59.87865996360779` is "better" than
`66.49057507514954` even though _numerically_ it is less than the other value.

It was important for LEAP to override the `<` operator for `Individual`s because
it uses native sort operations to find the "best" and "worst", and so minimization vs.
maximization semantics needed to be taken into account.

Missing pipeline operator arguments
-----------------------------------

Expand Down

0 comments on commit 169a9b7

Please sign in to comment.