|
QDpy
|
Case-wise parent selection for discrete and continuous errors. More...
Go to the source code of this file.
Namespaces | |
| namespace | qdpy |
Functions | |
| qdpy.algorithms.lexicase.lexicase_index (errors, rng, *, epsilon=0.) | |
| Select one parent from scores, processing cases in a fresh random order. | |
| qdpy.algorithms.lexicase.novelty_case_counts (outputs, *, history=()) | |
| Count matching outputs independently for each test case. | |
| qdpy.algorithms.lexicase.novelty_lexicase_index (errors, outputs, rng, *, history=()) | |
| Select one exact lexicase parent using error and output-rarity cases. | |
Case-wise parent selection for discrete and continuous errors.
Definition in file lexicase.py.
| qdpy.algorithms.lexicase.lexicase_index | ( | errors, | |
| rng, | |||
| * | , | ||
| epsilon = 0. ) |
Select one parent from scores, processing cases in a fresh random order.
| errors | Finite matrix with candidates as rows and cases as columns. |
| rng | NumPy random generator used for shuffling and tie breaking. |
| epsilon | A nonnegative absolute tolerance, or "mad" for semi-dynamic epsilon-lexicase. |
Minimize errors one case at a time among the remaining candidates. Zero tolerance implements exact lexicase. With epsilon="mad", a case's median absolute deviation is computed over the original pool. The best error is recomputed among the survivors for every case. Choose uniformly if several candidates remain after the last case.
Definition at line 20 of file lexicase.py.
| qdpy.algorithms.lexicase.novelty_case_counts | ( | outputs, | |
| * | , | ||
| history = () ) |
Count matching outputs independently for each test case.
| outputs | Candidate rows of hashable output labels. |
| history | Previously measured output rows with the same case layout. |
Count an output's occurrences in the current population and history. Choose hashable labels before calling this function. For continuous outputs, a caller can discretize values to determine what counts as the same behavior. History participates in counts and stays outside the selection pool.
Definition at line 66 of file lexicase.py.
| qdpy.algorithms.lexicase.novelty_lexicase_index | ( | errors, | |
| outputs, | |||
| rng, | |||
| * | , | ||
| history = () ) |
Select one exact lexicase parent using error and output-rarity cases.
Shuffle original error columns and output counts together as cases.
Definition at line 90 of file lexicase.py.