graph2mat.tools.lightning.PlotMatrixError

class graph2mat.tools.lightning.PlotMatrixError(split: Literal[None, 'val', 'test'] = None, show: bool = False, store_in_logger: bool = True)[source]

Bases: Callback

Callback to create plots of MAE and RMSE for each entry of matrix.

It only works if the matrix for all structures has always exactly the same shape. This happens for example if the structures are all snapshots from a molecular dynamics simulation.

This callback is then useful to visualize how the errors are distributed within the matrix.

Parameters:
  • split – Split for which to plot the errors. If None, the callback will be used for both validation and test splits.

  • show – Whether to show the plots or not.

  • store_in_logger – Whether to store the plots in the logger or not.

Methods

on_test_batch_end(trainer, pl_module, ...[, ...])

Called when the test batch ends.

on_test_epoch_end(trainer, pl_module)

Called when the test epoch ends.

on_test_epoch_start(trainer, pl_module)

Called when the test epoch begins.

on_validation_batch_end(trainer, pl_module, ...)

Called when the validation batch ends.

on_validation_epoch_end(trainer, pl_module)

Called when the val epoch ends.

on_validation_epoch_start(trainer, pl_module)

Called when the val epoch begins.

Attributes

on_test_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx=0)[source]

Called when the test batch ends.

on_test_epoch_end(trainer, pl_module)[source]

Called when the test epoch ends.

on_test_epoch_start(trainer, pl_module)[source]

Called when the test epoch begins.

on_validation_batch_end(trainer, pl_module, outputs, batch, batch_idx, dataloader_idx=0)[source]

Called when the validation batch ends.

on_validation_epoch_end(trainer, pl_module)[source]

Called when the val epoch ends.

on_validation_epoch_start(trainer, pl_module)[source]

Called when the val epoch begins.