Plotter.evaluate_generation
- Plotter.evaluate_generation(attributes: List[str] = None, range_bins: List[List[Tuple[float, float]]] = None, transformed: bool = False, bottom_top: Tuple[float, float] = (None, None), downsamp: int = 2, n_bins: int = 10, n_samples_per_bin=100, oversampling_gen: int = 10, datamodule: DataModule = None, output_name: str = None, analyzer: AnalysisCallback = None) Figure | None [source]
Compact plot for evaluating the generation capabilities of the (V)AE model, in which there is a subplot for each selected attribute with the following traces:
Density plot of the attribute for the training and validation set.
Mean design error with confidence interval of the attribute for all generated samples binned across the attributes domain (design error n/n), where n := oversampling_gen * n_samples_per_bin
Mean design error with confidence interval of the attribute for the best generated samples binned across the attributes domain (design error m/n), where m := n_samples_per_bin and n := oversampling_gen * n_samples_per_bin
Percentile lines (bottom and top) of the attribute’s density for training data (optional)
- Parameters:
attributes (List[str], optional, default=None) – List of attributes (= names of DataObject’s) to select. If None, all attributes (specified in DataModule.output_ml_dblock) are considered.
range_bins (List[List[Tuple[float, float]]], optional, default=None) – To specify a custom range where to obtain the bins to evaluate the training. If None, the range is obtained from the training data.
transformed (bool, optional, default=False) – If True, the data is plotted transformed, while False returns the plots it in its original domain
bottom_top (Tuple[float, float], optional, default=(None, None)) – Tuple of two floats, defining the percentile lines (bottom and top) to be plotted in the histogram as vertical lines.
downsamp (int, optional, default=2) – Down-sampling factor for the data.
n_bins (int, optional, default=10) – Number of bins used for the error traces.
n_samples_per_bin (int, optional, default=100) – Number of samples per bin used for the error traces.
oversampling_gen (int, optional, default=10) – Oversampling factor defining the factor of oversampling.
datamodule (DataModule, optional, default=None) – A DataModule object used for evaluation. If None, the datamodule provided when creating the plotter is used.
output_name (str, optional, default=None) – Name of the output file.
analyzer (AnalysisCallback, optional, default=None) – If provided, the generator will use the analyzer to compute the ground truth values. This is only possible when the InputML and OutputML are aligned with the DesignParameters and the PerformanceAttributes. If not, these values won’t be computed.
- Returns:
Optional[
plotly.graph_objects.Figure
] – Plotly figure object, if self.output is None, otherwise None.