IBCNServices / GENDIS

Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.
Other
102 stars 26 forks source link

Support for custom fitness function #7

Closed GillesVandewiele closed 5 years ago

GillesVandewiele commented 5 years ago

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