module documentation
Fitness surrogate model classes and handler for incremental evaluations.
Class |
|
Up to a full quadratic model using the pseudo inverse to compute the model coefficients. |
Class |
|
Undocumented |
Class |
|
inject model.xopt and decrease sigma if mean is close to model.xopt . |
Class |
|
Undocumented |
Class |
|
surrogate f-values for a population. |
Class |
|
Undocumented |
Class |
|
placeholder to store Kendall tau related things |
Function | kendall |
return rank correlation coefficient between data x and y |
Variable | __ |
Undocumented |
Variable | __license__ |
Undocumented |
Function | _kendall |
return Kendall tau rank correlation coefficient. |
Function | _n |
truncate worst solutions for model building |
Function | _sorted |
Undocumented |
return Kendall tau rank correlation coefficient.
Implemented only to potentially remove dependency on scipy.stats
.
This
>>> import numpy as np >>> from cma.fitness_models import _kendall_tau >>> kendalltau = lambda x, y: (_kendall_tau(x, y), 0) >>> # from scipy.stats import kendalltau # incomment if not available >>> for dim in np.random.randint(3, 22, 5): ... x, y = np.random.randn(dim), np.random.randn(dim) ... t1, t2 = _kendall_tau(x, y), kendalltau(x, y)[0] ... # print(t1, t2) ... assert np.isclose(t1, t2)