plot_metric

hybrid_learning.experimentation.fuzzy_exp.fuzzy_exp_vis.plot_metric(metrics_pd, model_key, metrics='recall', verbose=True, formulas=None, logic_types=('boolean', 'lukasiewicz', 'product', 'goedel'), title='{model_key} {metric}', formula_name_col={'formula_attrs': 'formula'}, save_as=None, xlim=(0, 1), to_pretty_names=None, ax=None)[source]

Plot a bar chart for each of the given metrics from entries in metrics_pd.

Parameters
  • metrics_pd (DataFrame) – DataFrame with all of formula_name_col, "model_key", metrics, logic_type as columns

  • verbose (bool) – whether to display some intermediate results

  • formulas (Optional[tuple]) – specifier strings of the formulas to match (simple filter option on formula_name_col column)

  • logic_types (tuple) – specifier strings of the logic types to match (simple filter option on "logic_type" column)

  • title (str) – figure title; may contain formatting placeholders {model_key} and {metric}

  • formula_name_col (Union[str, Dict[str, str]]) – name of the column containing the formula specs to match with formulas

  • save_as (Optional[str]) – if given, either directory or file path where to save this plot

  • xlim (Tuple[float, float]) – if set, the minimum and maximum values displayed on the x-axis; if None or False, automatically determined by matplotlib

  • to_pretty_names (Optional[Dict[str, str]]) – dictionary mapping values of model_key and metrics to pretty names

  • ax – an axis into which to plot; by default, a new figure is created

  • model_key (str) –

  • metrics (str) –

Returns

list with the filtered DataFrames that got plotted

Return type

List[DataFrame]