mealy.error_analysis_utils

Functions

mealy.error_analysis_utils.check_enough_data(df, min_len)[source]

Compare length of dataframe to minimum lenght of the test data. Used in the relevance of the measure.

Parameters
  • df – Input dataframe

  • min_len

Returns

mealy.error_analysis_utils.check_lists_having_same_elements(list_A, list_B)[source]
mealy.error_analysis_utils.format_float(number, decimals)[source]

Format a number to have the required number of decimals. Ensure no trailing zeros remain.

Parameters
  • number (float or int) – The number to format

  • decimals (int) – The number of decimals required

Returns

The number as a formatted string

Return type

formatted (str)

mealy.error_analysis_utils.generate_preprocessing_steps(transformer, invert_order=False)[source]
mealy.error_analysis_utils.get_epsilon(difference)[source]

Compute the threshold used to decide whether a prediction is wrong or correct (for regression tasks).

Parameters

difference (1D-array) – The absolute differences between the true target values and the predicted ones (by the primary model).

Returns

The value of the threshold used to decide whether the prediction for a regression task is wrong or correct

Return type

epsilon (float)

mealy.error_analysis_utils.invert_transform_via_identity(step)[source]