class_docstr: A metric to measure the fitness of a program.
  
  This object is able to be called with NumPy vectorized arguments and return
  a resulting floating point score quantifying the quality of the program's
  representation of the true relationship.
  
  Parameters
  ----------
  function : callable
      A function with signature function(y, y_pred, sample_weight) that
      returns a floating point number. Where `y` is the input target y
      vector, `y_pred` is the predicted values from the genetic program, and
      sample_weight is the sample_weight vector.
  
  greater_is_better : bool
      Whether a higher value from `function` indicates a better fit. In
      general this would be False for metrics indicating the magnitude of
      the error, and True for metrics indicating the quality of fit.
code: def __init__(self, function, greater_is_better):
      self.function = function
      self.greater_is_better = greater_is_better
      self.sign = 1 if greater_is_better else -1
  
file_path: gplearn/gplearn/fitness.py
imports: import numbers
  import numpy
  from joblib import wrap_non_picklable_objects
  from scipy.stats import rankdata
label_desc: Use image node_id 1 to create a new _Fitness object from inherited base classes: object with example: obj = _Fitness(function, greater_is_better)