watex.utils.check_flow_objectivity#

watex.utils.check_flow_objectivity(y, /, values, classes)[source]#

Function checks the flow rate objectivity

If objective is set to flow i.e the prediction focuses on the flow rate, there are some conditions that the target y needs to meet when values are passed for classes categorization.

Parameters:
  • values – list of values to encoding the numerical target y. for instance values=[0, 1, 2]

  • objective – str, relate to the flow rate prediction. Set to None for any other predictions.

  • prefix

    the prefix to add to the class labels. For instance, if the prefix equals to FR, class labels will become:

    [0, 1, 2] => [FR0, FR1, FR2]
    

  • classes

    list of classes names to replace the default FR that is used to specify the flow rate. For instance, it can be:

    [0, 1, 2] => [sf0, sf1, sf2]
    

Returns:

(y, classes): Tuple, - y: array-like 1d of categorized y - classes: list of flow rate classes.