Plotter.attributes_obs_vs_pred

Plotter.attributes_obs_vs_pred(block: str, attributes: List[str] = None, transformed: bool = False, per_column: bool = False, downsamp: int = 1, n_cols: int = 1, datamodule: DataModule | None = None) Figure | None[source]

Plots the observed (true) vs predicted values for all the selected attributes (= DataObject’s) in the given data block of the datamodule. (InputML or OutputML). For categorical attributes, a confusion matrix is plotted.

Parameters:
  • block (str) – Name of the data block to be plotted. The block must be available the datamodule.

  • attributes (List[str], optional, default=None) – List of attributes (= names of DataObject’s) to be plotted. If None, all attributes of the block are plotted.

  • transformed (bool, optional, default=False) – If True, the data is plotted transformed, while False returns the plots it in its original domain

  • per_column (bool, optional, default=False) – If True, multi-dimensional attributes are plotted as separate traces and subplots, otherwise all data is flattened to a single trace.

  • downsamp (int, optional, default=1) – Down-sampling factor for the data.

  • n_cols (int, optional, default=1) – Number of columns in the plot.

  • datamodule (DataModule, optional, default=None) – A DataModule object used for evaluation. If None, the datamodule provided when creating the plotter is used.

Returns:

Optional[plotly.graph_objects.Figure] – Plotly figure object, if self.output is None, otherwise None.

Notes

The plot is generated using the validation set of the datamodule. Legends of the plot might not be displayed correctly in certain environments, see plotly/plotly.py#4489 for more information.