porcupy.utils.plotting

Functions

plot_convergence(cost_history[, title, save_path])

Plot the convergence curve of the optimization process.

Module Contents

porcupy.utils.plotting.plot_convergence(cost_history, title='Convergence Curve', save_path=None)[source]

Plot the convergence curve of the optimization process.

Parameters:
  • cost_history (ndarray) – Array of best fitness values over iterations.

  • title (str, optional) – Title of the plot (default: “Convergence Curve”).

  • save_path (str, optional) – Path to save the plot (e.g., “convergence.png”). If None, displays the plot.

Return type:

None