allow user to write his own custom loss function, interface should be smth like:
def fitness(D, y):
"""Calculate the fitness of a candidate solution.
Parameters
---------------
D: 2D array-like.
array of distances
y: 1D array-like
array with ground truth
Returns
-----------
x: float
the score the genetic algorithm tries to maximize
"""
return x
allow user to write his own custom loss function, interface should be smth like: