:py:mod:`mlair.plotting.training_monitoring` ============================================ .. py:module:: mlair.plotting.training_monitoring .. autoapi-nested-parse:: Plots to monitor training. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: mlair.plotting.training_monitoring.PlotModelHistory mlair.plotting.training_monitoring.PlotModelLearningRate Attributes ~~~~~~~~~~ .. autoapisummary:: mlair.plotting.training_monitoring.__author__ mlair.plotting.training_monitoring.__date__ mlair.plotting.training_monitoring.history_object mlair.plotting.training_monitoring.lr_object .. py:data:: __author__ :annotation: = Felix Kleinert, Lukas Leufen .. py:data:: __date__ :annotation: = 2019-12-11 .. py:data:: history_object .. py:data:: lr_object .. py:class:: PlotModelHistory(filename: str, history: history_object, plot_metric: str = 'loss', main_branch: bool = False, epoch_best: int = None) Plot history of all plot_metrics (default: loss) for a training event. For default plot_metric and val_plot_metric are plotted. If further metrics are provided (name must somehow include the word ``), this additional information is added to the plot with an separate y-axis scale on the right side (shared for all additional metrics). The plot is saved locally. For a proper saving behaviour, the parameter filename must include the absolute path for the plot. .. py:method:: _get_plot_metric(self, history, plot_metric, main_branch, correct_names=True) .. py:method:: _filter_columns(self, history: Dict) -> List[str] Select only columns named like %%. The default metrics '' and 'val_' are removed too. :param history: a dict with at least '' and 'val_' as keys (can be derived from keras History.history) :return: filtered columns including all plot_metric variations except and val_. .. py:method:: _plot(self, filename: str) -> None Create plot. Plots and val_ as default. If more plot_metrics are provided, they will be added with an additional yaxis on the right side. The plot is saved in filename. :param filename: name (including total path) of the plot to save. .. py:class:: PlotModelLearningRate(filename: str, lr_sc: lr_object) Plot the behaviour of the learning rate in dependence of the number of epochs. The plot is saved locally as pdf. For a proper saving behaviour, the parameter filename must include the absolute path for the plot. .. py:method:: _plot(self, filename: str) -> None Create plot. Plot the learning rate in dependence of epoch. :param filename: name (including total path) of the plot to save.