mlektic.plot_utils package
Submodules
mlektic.plot_utils.plot_utils module
- mlektic.plot_utils.plot_utils.plot_cost(cost_history: List[Union[float, int]], epoch_points: bool = False, title: str = 'Training Cost over Iterations', xlabel: str = 'Iterations', ylabel: str = 'Cost', title_size: int = 13, label_size: int = 10, style: str = 'bmh', point_color: str = 'blue', line_color: str = 'blue', dim: Tuple = (7, 5)) None [source]
Generates a static plot of the cost history during training.
- Parameters:
cost_history (List[Union[float, int]]) – List of cost values recorded during training.
epoch_points (bool, optional) – Whether to show points at each epoch. Default is False.
title (str, optional) – Title of the plot. Default is “Training Cost over Iterations”.
xlabel (str, optional) – Label for the x-axis. Default is “Iterations”.
ylabel (str, optional) – Label for the y-axis. Default is “Cost”.
title_size (int, optional) – Font size of the title. Default is 13.
label_size (int, optional) – Font size of the axis labels. Default is 10.
style (str, optional) – Style of the plot. Default is ‘bmh’.
point_color (str, optional) – Color of the points. Default is ‘blue’.
line_color (str, optional) – Color of the line. Default is ‘black’.
dim (Tuple, optional) – Dimensions of the plot (width, height). Default is (7, 5).
- Returns:
None
- mlektic.plot_utils.plot_utils.plot_dynamic_cost(cost_history: List[Union[float, int]], title: str = 'Training Cost over Iterations', xlabel: str = 'Iterations', ylabel: str = 'Cost', title_size: int = 13, label_size: int = 10, style: str = 'bmh', point_color: str = 'blue', line_color: str = 'black', pause_time: float = 0.1, dim: Tuple = (10, 6)) None [source]
Generates a dynamic plot of the cost history during training, showing each point as it is added.
- Parameters:
cost_history (List[Union[float, int]]) – List of cost values recorded during training.
title (str, optional) – Title of the plot. Default is “Training Cost over Iterations”.
xlabel (str, optional) – Label for the x-axis. Default is “Iterations”.
ylabel (str, optional) – Label for the y-axis. Default is “Cost”.
title_size (int, optional) – Font size of the title. Default is 13.
label_size (int, optional) – Font size of the axis labels. Default is 10.
style (str, optional) – Style of the plot. Default is ‘bmh’.
point_color (str, optional) – Color of the points. Default is ‘blue’.
line_color (str, optional) – Color of the line. Default is ‘black’.
pause_time (float, optional) – Pause time between updates in seconds. Default is 0.1.
dim (Tuple, optional) – Dimensions of the plot (width, height). Default is (10, 6).
- Returns:
None