plot package
Submodules
plot.advanced_classification_plot module
- class plot.advanced_classification_plot.AdvancedClassificationPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the advanced evaluation of a classification task.
See
MplPlotandAdvancedClassificationEvaluation.- Variables:
evals (list of
ClassificationEvaluation) – The many evaluations on the classification based on the requested filters.class_names (list of str) – The names for each class involved in the classification.
domain_name – See
AdvancedClassificationEvaluator.num_points – See
AdvancedClassificationEvaluation.num_fpoints – See
AdvancedClassificationEvaluation.
- __init__(**kwargs)
Initialize an instance of AdvancedClassificationPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the global metrics, class-wise metrics, confusion matrices, and class distributions if the information is available.
See
plot.Plot.plot().
- plot_global_metrics(**kwargs)
Plot the global metrics.
- plot_classwise_metrics(**kwargs)
Plot the class-wise metrics.
- plot_confusion_matrices(**kwargs)
Plot the confusion matrices.
- plot_class_distribution(**kwargs)
Plot the class distribution for each node in the domain.
- has_global_metrics()
Check whether the plot contains global metrics.
- Returns:
True if the plot contains global metrics, False otherwise.
- has_classwise_metrics()
Check whether the plot contains class-wise metrics.
- Returns:
True if the plot contains class-wise metrics, False otherwise.
- has_confusion_matrices()
Check whether the plot contains confusion matrices.
- Returns:
True if the plot contains confusion matrices, False otherwise.
- has_class_distribution()
Check whether the plot contains all the information needed to plot the class distribution.
- Returns:
True if the plot contains all the information needed to plot the class distribution.
plot.class_reduction_plot module
- class plot.class_reduction_plot.ClassReductionPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the results of a class reduction task.
See
MplPlotandClassReducer.- Variables:
original_class_names (list of str) – The names of the original classes.
yo (
np.ndarray) – The original classification.reduced_class_names (list of str) – The names of the reduced classes.
yr (
np.ndarray) – The reduced classification.
- __init__(**kwargs)
Initialize an instance of ClassReductionPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the class distribution of the original and reduced classes.
See
plot.Plot.plot().
- plot_class_distribution(ax, class_names, y)
Plot the class distribution.
- Parameters:
ax – The axes where the plot must be drawn.
class_names – The name for each class.
y – The point-wise classes.
- Returns:
Nothing at all, but the subplot is drawn in the given axes.
plot.classification_plot module
- class plot.classification_plot.ClassificationPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the evaluation of a classification task.
See
MplPlotandClassificationEvaluation.- Variables:
class_names – See
ClassificationEvaluation.ignore_classes – See
ClassificationEvaluation.yhat_count – See
ClassificationEvaluation.y_count – See
ClassificationEvaluation.conf_mat – See
ClassificationEvaluation.class_distribution_path (str) – The path where the class distribution plot must be written. Can be None. In that case, no class distribution plot will be written.
- __init__(**kwargs)
Initialize an instance of ClassificationPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the confusion matrix and the class distribution if the information is available.
See
plot.Plot.plot().
- plot_confusion_matrix(**kwargs)
Plot the confusion matrix.
- plot_class_distribution(**kwargs)
Plot the class distribution.
- static do_class_distributions_subplots(ax_pred, ax_ref, yhat_count, y_count, class_names, pred_title='Predictions', ref_title='Reference')
Handle two bar subplots, one for the distribution of predictions on the different classes, the other for the distribution of the references.
- Parameters:
ax_pred – The axes where the distribution of predictions will be plotted.
ax_ref – The axes where the distribution of references will be plotted.
yhat_count – See
ClassificationEvaluation.y_count – See
ClassificationEvaluation.class_names – See
ClassificationEvaluator.pred_title (str) – The title for the predictions-based subplot.
ref_title (str) – The title for the reference-based subplot.
- static do_confusion_matrix_plot(fig, ax, cmat, class_names, ignore_classes=None, normalization_strategy=None, title=None)
Handle the plot of the confusion matrix on the given figure and axes.
- Parameters:
fig – The figure where the confusion matrix must be plotted.
ax – The axes (inside the figure) where the confusion matrix must be plotted.
cmat (
np.ndarray) – The confusion matrix to be plotted.class_names – See
ClassificationEvaluator.ignore_classes – See
ClassificationEvaluator.normalization_strategy – See
ClassificationEvaluation, more concretely, the conf_mat_norm_type attribute (ivar).title (str or None) – Optional title to be assigned to the axes where the confusion matrix is represented.
- has_confusion_matrix()
Check whether the plot contains a confusion matrix.
- Returns:
True if the plot contains a confusion matrix, False otherwise.
- has_class_distribution()
Check whether the plot contains all the information needed to plot the class distribution.
- Returns:
True if the plot contains all the information needed to plot the class distribution.
plot.classification_uncertainty_plot module
- class plot.classification_uncertainty_plot.ClassificationUncertaintyPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the uncertainty of classified point clouds.
See
MplPlotandClassificationUncertaintyEvaluation.- Variables:
class_names – See
ClassificationUncertaintyEvaluation.y – See
ClassificationUncertaintyEvaluation.yhat – See
ClassificationUncertaintyEvaluation.pwise_entropy – See
ClassificationUncertaintyEvaluation.weighted_entropy – See
ClassificationUncertaintyEvaluation.cluster_wise_entropy – See
ClassificationUncertaintyEvaluation.class_ambiguity – See
ClassificationUncertaintyEvaluation.gaussian_kernel_points – See
ClassificationUncertaintyEvaluation.
- __init__(**kwargs)
Initialize an instance of ClassificationUncertaintyPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot representations of the available uncertainty metrics.
See
plot.Plot.plot().
- plot_full_histogram(fig=None, ax=None, Ename=None, E=None)
Handle the full histogram subplot.
- Parameters:
fig – The figure context.
ax – The axes context.
Ename – The name of the entropy or uncertainty metric.
E – The entropy or uncertainty metric.
- plot_hitfail_histogram(fig=None, ax=None, Ename=None, E=None)
Handle the hit/fail histogram subplot.
- Parameters:
fig – The figure context.
ax – The axes context.
Ename – The name of the entropy or uncertainty metric.
E – The entropy or uncertainty metric.
- plot_classwise_violin(fig=None, ax=None, Ename=None, E=None, y=None, title=None)
Handle the class-wise violin subplot.
- Parameters:
fig – The figure context.
ax – The axes context.
Ename – The name of the entropy or uncertainty metric.
E – The entropy or uncertainty metric.
y – The labels (either reference labels or predicted labels).
plot.distance_reclassification_plot module
- class plot.distance_reclassification_plot.DistanceReclassificationPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the results of a distance reclassification task.
See
MplPlotandDistanceReclassifier.- Variables:
yin (
np.ndarray) – The vector of point-wise input labels.yout (
np.ndarray) – The vector of point-wise output labels.yinlut (dict) – The look-up table whose keys are input class names and whose values are the corresponding input class indices.
youtlut (dict) – The look-up table whose keys are output class names and whose values are the corresponding output class indices.
- __init__(**kwargs)
Initialize an instance of DistanceReclassificationPlot.
- Parameters:
kwargs – The key-word arguments defining hte plot’s attributes.
- plot(**kwargs)
Plot the class distribution of the original and transformed classes.
See
plot.Plot.plot().
- plot_class_distribution(ax, lut, y)
Plot the class distribution.
- Parameters:
ax – The axes where the plot must be drawn..
lut – The look-up table of the input classes whose keys are the class names and whose values are the class indices.
y – The point-wise classes.
- Returns:
Nohting at all, but the subplot is drawn in the given axes.
plot.feature_processing_layer_plot module
- class plot.feature_processing_layer_plot.FeatureProcessingLayerPlot(M, Omega, **kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the insights of a feature processing layer.
See
MplPlotFeatureProcessingLayer.- Variables:
M (
np.ndarray) – The matrix of kernel’s centers.Omega (
np.ndarray) – The matrix of kernel sizes (think about curvatures).
- __init__(M, Omega, **kwargs)
Initialize an instance of FeatureProcessingLayerPlot
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the kernel’s radial basis functions.
For each feature, the domain of the variable \(x\) is considered as \(x \in [x_*, x^*]\) where \(x_* = \min_{1 \leq i \leq K} \; \{x_i\} - \sigma\) and \(x^* = \max_{1 \leq 1 \leq K} \; \{x_i\} + \sigma\) with \(\sigma\) the standard deviation of the variable.
See
plot.Plot.plot().
plot.features_structuring_layer_plot module
- class plot.features_structuring_layer_plot.FeaturesStructuringLayerPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the insights of a features structuring layer.
See
MplPlotandFeaturesStructuringLayer.- Variables:
QW (
np.ndarray) – The matrix of kernel’s weights.omegaD (
np.ndarray) – The vector of distance weights.omegaF (
np.ndarray) – The vector of feature weights.xmax (float) – The maximum value for the distance domain (defines the x-axis for omegaD plots).
kernel_type – The type of kernel to use (e.g., “Gaussian” or “Markov”).
omegaD_name (str) – The name of the omegaD vector (typically omegaD but it can be overriden to reutilize the report by a
RBFFeatExtractLayer.
- __init__(**kwargs)
Initialize an instance of FeaturesStructuringLayerPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the omegaD(x) for x in [0, xmax] as a function and omegaF as bars. Also plot a histogram with the values of QW.
See
plot.Plot.plot().
plot.kfold_plot module
- class plot.kfold_plot.KFoldPlot(X, sigma, **kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the evaluation of kfold procedures. See
KFoldEvaluation.- Variables:
X – See
kfold_evaluator.KFoldEvaluator.eval()sigma – See
KFoldEvaluationmetric_names (list) – The name for each metric used to evaluate the k-fold procedure.
- __init__(X, sigma, **kwargs)
Initialize/instantiate a KFoldPlot.
- Parameters:
kwargs – The attributes for the KFoldPlot.
- plot(**kwargs)
Plot a grid where each cell contains a subplot representing the k-folding evaluation on a particular metric.
See
plot.Plot.plot().
plot.kpconv_layer_plot module
- class plot.kpconv_layer_plot.KPConvLayerPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the insights of a KPConv layer.
See
KPConvLayerPlotandKPConvLayer.- Variables:
Q (
np.ndarray) – The matrix representing the kernel’s structure.W (
np.ndarray) – The matrices representing the kernel’s weights.Wpast (
np.ndarray) – The matrices representing the kernel’s weights at a previous state.sigma (float) – The influence distance of the kernel.
name (str) – The name of the layer containing the kernel.
- __init__(**kwargs)
Initialize an instance of KPConvLayerPlot.
- Parameters:
kwargs (dict) – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the structure space and the matrices of weights representing the kernel of the KPConv layer.
See
plot.Plot.plot().
- plot_kernel_structure(**kwargs)
Plot the kernel’s structure.
- Parameters:
kwargs – The key-word arguments.
- Returns:
Nothing, but the plot is written to a file.
- plot_kernel_weights(W, plot_name, plot_title, **kwargs)
Plot the kernel’s weights.
- Parameters:
W – The tensor whose slices are the weights of the kernel.
plot_name – The name of the plot.
plot_title – The title of the plot.
kwargs – The key-word arguments.
- Returns:
Nothing, but the plot is written to a file.
- static plot_kernel_weights_as_matrix(fig, ax, Wk)
Assist the
KPConvLayerPlot.plot_kernel_weights()function by providing the logic to plot a matrix of weights as a matrix.
- static plot_kernel_weights_as_historgram(fig, ax, Wk)
Assist the
KPConvLayerPlot.plot_kernel_weights()function by providing the logic to plot a matrix of weights as a histogram.
plot.light_kpconv_layer_plot module
- class plot.light_kpconv_layer_plot.LightKPConvLayerPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the insights of a light KPConv layer.
See
LightKPConvLayerPlotandLightKPConvLayer.- Variables:
Q (
np.ndarray) – The matrix representing the kernel’s structure.W (
np.ndarray) – The matrix representing the kernel’s weights.A (
np.ndarray) – The matrix representing the kernel’s scale factors.Wpast (
np.ndarray) – The matrices representing the kernel’s weights at a previous state.sigma (float) – The influence distance of the kernel.
name (str) – The name of the layer containing the kernel.
- __init__(**kwargs)
Initialize an instance of LightKPConvLayerPlot.
- Parameters:
kwargs (dict) – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot the structure space, the matrix of weights, and the scale factors representing the kernel of the light KPConv layer.
See
plot.Plot.plot().
- plot_kernel_weights(W, plot_name, plot_title, **kwargs)
Plot the kernel’s weights.
- Parameters:
W – The matrix representing the weights of the kernel.
plot_name – The name of the plot.
plot_title – The title of the plot.
kwargs – The key-word arguments.
- Returns:
Nothing, but the plot is written to a file.
- plot_scale_factors(A, plot_name, plot_title, **kwargs)
Plot the scale factors.
- Parameters:
A (
np.ndarray) – The matrix representing the scale factors.plot_name – The name of the plot.
plot_title – The title of the plot.
kwargs – The key-word arguments.
- Returns:
Nothing, but the plot is written to a file.
plot.mpl_plot module
- class plot.mpl_plot.MplPlot(**kwargs)
Bases:
Plot,ABC- Author:
Alberto M. Esmoris Pena
Abstract class providing common behaviors for plots based on Matplotlib.
- __init__(**kwargs)
Initialize a MplPlot.
- Parameters:
kwargs – The attributes for the MplPlot.
- save_show_and_clear(out_prefix=None, logging=False)
Method to handle the save, show, and clear figure logic. It is expected to be called at the end of a plot method invocation. See
plot.Plot.plot().- Returns:
Nothing.
plot.pca_variance_plot module
- class plot.pca_variance_plot.PCAVariancePlot(evr, **kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the explained variance ratio from a PCA. See
PCATransformer- Variables:
evr (
np.ndarray) – The explained variance ratio for each feature derived by PCA projection.
- __init__(evr, **kwargs)
Initialize a MplPlot.
- Parameters:
kwargs – The attributes for the MplPlot.
- plot(**kwargs)
Plot the explained variance ratio (y axis) over the number of output dimensions (x axis).
See
plot.Plot.plot().
plot.plot module
- exception plot.plot.PlotException(message='')
Bases:
VL3DException- Author:
Alberto M. Esmoris Pena
Class for exceptions related to plot components. See
VL3DException- __init__(message='')
- class plot.plot.Plot(**kwargs)
Bases:
object- Author:
Alberto M. Esmoris Pena
Abstract class providing the interfaces governing any plot.
- Variables:
path (str) – The path to save the plot to a file.
show (bool) – The boolean flag controlling whether to show the plot (True) or not (False).
- __init__(**kwargs)
Root initialization for any instance of type Plot.
- Parameters:
kwargs – The attributes for the plot.
- abstractmethod plot(**kwargs)
Do the plot effective. The typical steps are:
1. Do plot computations, i.e., prepare the plot, build the plot, and format the plot).
2. If the plot is associated to a path, then write it to the corresponding file.
If the show flag is true, visualize the plot.
- Returns:
Nothing.
plot.plot_utils module
- class plot.plot_utils.PlotUtils
Bases:
object- Author:
Alberto M. Esmoris Pena
Class with util static methods for common plot operations.
- static rows_and_cols_for_nplots(nplots, transpose=False)
Determine the number of rows and columns required to plot a grid of n subplots.
By default, the number of rows is greater than or equal to the number of columns. This condition can be reversed by setting transpose to True.
- Parameters:
nplots – The number of subplots in the grid (n).
transpose – If True, return cols and rows instead of rows and cols.
- Returns:
The number of rows and the number of columns required to plot n subplots.
- Return type:
(int, int)
plot.rand_forest_plot module
- class plot.rand_forest_plot.RandForestPlot(trees, **kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the evaluation of trained random forest models. See
RandomForestEvaluation.- Variables:
trees (list) – The trees to be plotted.
max_depth (int or None) – The maximum depth to consider when plotting a tree. It is optional. When not given, full trees will be plotted.
fnames (list) – The feature names.
- __init__(trees, **kwargs)
Initialize/instantiate a RandForestPlot.
- Parameters:
trees – The tree-like estimators.
fnames – The feature names.
kwargs – The attributes for the RandForestPlot.
- plot(**kwargs)
Do one plot per tree-like estimator representing the many decisions defining the model.
See
plot.Plot.plot().
- plot_tree(tree, i)
Do the plot for a single tree.
- Parameters:
tree – The tree to be plotted.
i – The number of the tree. NOTE it is not the index of the tree in the ensemble, unless all trees are considered. Instead, it is the number of the tree in the local context of selected trees.
plot.raster_grid_plot module
- class plot.raster_grid_plot.RasterGridPlot(**kwargs)
Bases:
Plot- Author:
Alberto M. Esmoris Pena
Class to generate the raster-like plots corresponding to a given point cloud.
See
PlotandRasterGridEvaluation.- Variables:
X (
np.ndarray) – The matrix of coordinates representing the rasterized point cloud.Fgrids (list of
np.ndarray) – The grids of features representing the rasterized point cloud.onames (list of str) – The list of names representing each grid of features.
crs (str) – The coordinate reference system (CRS).
xres (float) – The cell size along the x-axis.
yres (float) – The cell size along the y-axis.
- __init__(**kwargs)
Initialize an instance of RasterGridPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Plot raster-like representations of the point cloud.
See
plot.Plot.plot().
plot.receptive_fields_distribution_plot module
- class plot.receptive_fields_distribution_plot.ReceptiveFieldsDistributionPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the distribution of predicted or expected value in the receptive fields. See
ReceptiveFieldsDistributionPlot.- Variables:
y_rf (
np.ndarray) – The expected value for each point for each receptive field.yhat_rf (
np.ndarray) – The predicted value for each point for each receptive field.class_names (list) – The names representing each class.
- __init__(**kwargs)
Initialize a MplPlot.
- Parameters:
kwargs – The attributes for the MplPlot.
- plot(**kwargs)
Plot the distribution of predicted and/or expected values.
See
plot.Plot.plot().
- count(y)
Compute the absolute frequency and the count of receptive fields containing at least one class case.
- Parameters:
y (
np.ndarrayor list) – Either the predicted or the expected values for each receptive field. In other words, y[i] is the i receptive field such that y[i][j] is the value corresponding to the point j in the receptive field i.- Returns:
The absolute frequency considering all points and the count of how many receptive fields do contain at least one element of a given class. If a and b are the returned vectors, a[i] is the absolute frequency of class i and b[i] is the number of receptive fields that contain at least one point of class i.
- Return type:
tuple
- plot_counts(x, fig, count, rf_count, axes=None, count_title=None, rf_count_title=None, subplot_offset=0, nrows=1, ncols=2)
Do the plots corresponding to a set of counts. There are two potential sets of counts, the one corresponding to predictions, and the one corresponding to expected values.
- Parameters:
x (
np.ndarray) – The values for the x-axis of the plots.fig (
mpl.figure.Figure) – The matplotlib figure where the plots belong to.count (
np.ndarray) – How many cases among all receptive fields. In other words, count[i] is the number of cases corresponding to class i.rf_count (
np.ndarray) – How many receptive fields contain at least one case for each class. In other words, rf_count[i] is the number of receptive fields that contain at least one point of class i.axes (list) – List where the axes of the generated plots will be appended.
count_title – The title for the subplot corresponding to count.
rf_count_title – The title for the subplot corresponding to rf_count.
subplot_offset (int) – How many subplots skip before generating the new ones.
nrows (int) – How many rows of subplots.
- Type:
count_title: str
- Paran ncols:
How many columns of subplots.
- Returns:
Nothing at all, but the plots are made effective. If axes is not None, the corresponding axes are appended to the list.
plot.regression_plot module
- class plot.regression_plot.RegressionPlot(**kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot the evaluation of a regression task.
See
MplPlotandRegressionEvaluation.- Variables:
cases – See
RegressionEvaluation.quantities – See
RegressionEvaluation.errors – See
RegressionEvaluation.distribution – See
RegressionEvaluation.outers – See
RegressionEvaluation.regression_eval_path – See
RegressionEvaluation.regression_hist2d_path – See
RegressionEvaluation.residual_path – See
RegressionEvaluation.residual_hist2d_path – See
RegressionEvaluation.scatter_path – See
RegressionEvaluation.scatter_hist2d_path – See
RegressionEvaluation.qq_path – See
RegressionEvaluation.summary_path – See
RegressionEvaluation.
- __init__(**kwargs)
Initialize an instance of RegressionPlot.
- Parameters:
kwargs – The key-word arguments defining the plot’s attributes.
- plot(**kwargs)
Do the regression, residual, scatter, QQ, and summary plots for which the necessary information is available.
See
plot.Plot.plot().
- plot_regressions(path=None)
Plot the evaluation of the regressions.
- plot_residuals(path=None)
Plot the residuals.
- plot_regressions_hist2d(path=None)
Plot the evaluation of the regressions as a 2D histogram.
- plot_residuals_hist2d(path=None)
Plot the residuals as a 2D histogram.
- plot_scatter(path=None)
Plot the scatter.
- plot_scatter_hist2d(path=None)
Plot the scatter as a 2D histogram.
- plot_QQ(path=None)
Plot the QQ distribution (typically from the percentiles).
- plot_summary(path=None)
Plot the summary.
- static plot_error_scatter(ax, pred, pred_min, pred_max, error, ref_name, pred_name, error_name)
Plot the scatter plot between an error measurement and a feature/prediction.
- static plot_error_hist2d(fig, ax, pred, error, ref_name, pred_name, error_name)
Plot the 2D histogram plot representing an error measurement and a feature/prediction.
- has_residual_info()
Check whether the plot contains error data.
- Returns:
True if the plot contains error data, False otherwise.
- has_scatter_info()
Check whether the plot contains cases and quantities data.
- Returns:
True if the plot contains cases and quantities data, False otherwise.
- has_QQ_info()
Check whether the plot contains quantile distribution data.
- Returns:
True if the plot contains quantile distribution data, False otherwise.
- has_summary_info()
Check whether the plot contains error data.
- Returns:
True if the plot contains error data, False otherwise.
plot.training_history_plot module
- class plot.training_history_plot.TrainingHistoryPlot(history, **kwargs)
Bases:
MplPlot- Author:
Alberto M. Esmoris Pena
Class to plot (potentially many plots) the training history of a deep learning model, i.e., neural networks.
- Variables:
history (
keras.callbacks.History) – The history.filter (str or None) – The name of the filter to be applied (None means no filtering ).
- __init__(history, **kwargs)
Initialize a MplPlot.
- Parameters:
kwargs – The attributes for the MplPlot.
- plot(**kwargs)
Do the plots related to the training history.
See
plot.Plot.plot()
- do_isolated_plot(epochs, name, values, **kwargs)
Method to do handle the plot for each metric in the history.
- Parameters:
epochs (list) – The sequence of numbers representing the involved epochs, e.g., [0, 1, 2, 3, 4].
name (str) – The name of the metric.
values (list or tuple or
np.ndarray) – The values of the metric.kwargs – The key-word arguments. See
plot.Plot.plot().
- Returns:
Nothing at all, but the plot plot is exported.
- do_summary_plot(epochs, **kwargs)
Method to do handle the summary plot representing all metrics in the history.
- Parameters:
epochs (list) – The sequence of numbers representing the involved epochs, e.g., [0, 1, 2, 3, 4].
kwargs – The key-word arguments. See
plot.Plot.plot().
- Returns:
Nothing at all, but the plot subplot is exported.
- format_plot(fig, ax, name, values)
Apply format to given plot.
- Parameters:
fig – The plot’s figure.
ax – The plot’s axes.
name – The y label for the plot.
values – The plotted values.
- Returns:
Nothing at all, but the format of the input plot is updated.
- filter_values(values)
Filter given values. There are three possible filter modes.
Filter: None
No filter is returned.
Filter: “quartile”
The \([Q_1-\frac{3}{2}\mathrm{IQR}, Q_3+\frac{3}{2}\mathrm{IQR}]\) filter is returned.
Filter: “stdev”
The \([\mu-3\sigma, mu+3\sigma]\) filter is returned. Where \(\mu\) is the mean and \(\sigma\) is the standard deviation.
- Parameters:
values (tuple or list or
np.ndarray) – The values to be filtered.- Returns:
The min and max values defining the filtering interval.
- Return type:
tuple
Module contents
- author:
Alberto M. Esmoris Pena
The plot package contains the logic to plot the data, the models, and their evaluations.