report package

Submodules

report.advanced_classification_report module

class report.advanced_classification_report.AdvancedClassificationReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris PEna

Class to handle advanced reports related to classifications. See Report, ClassificationModel, AdvancedClassificationEvaluator, and AdvancedClassificationEvaluation.

Variables:
CONFMAT_SEPARATOR = '----------------'
__init__(**kwargs)

Initialize an instance of AdvancedClassificationReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

to_global_eval_string()

Generate the string representing the advanced classification report with respect to the advanced global evaluation.

Returns:

String representing the advanced classification report with respect to the advanced global evaluation.

to_class_eval_string()

Generate the string representing the advanced classification report with respect to the advanced class-wise evaluation.

Returns:

String representing the advanced classification report with respect to the advanced class-wise evaluation.

to_confusion_matrices_string()
Generate the string representing the advanced classification report

with respect to the advanced confusion matrices.

Returns:

String representing the advanced classification report with respect to the advanced confusion matrices.

to_class_distribution_string()

Generate the string representing the advanced classification report with respect to the advanced class distribution.

Returns:

String representing the advanced classification report with respect to the advanced class distribution.

to_file(report_path=None, class_report_path=None, confusion_matrix_report_path=None, class_distribution_report_path=None, out_prefix=None)

Write the advanced classification report to files.

Parameters:
Returns:

Nothing, the output is written to a file.

has_global_eval_info()

Check whether the report contains information about the global evaluation.

Returns:

True if the report contains information about the global evaluation, False otherwise.

has_class_eval_info()

Check whether the report contains information about the class-wise evaluation.

Returns:

True if the report contains information about the class-wise evaluation, False otherwise.

has_confusion_matrix()

Check whether the report contains the confusion matrix.

Returns:

True if the report contains the confusion matrix, False otherwise.

has_class_distribution_info()

Check whether the report contains information about the class distribution.

Returns:

True if the report contains information about the class distribution, False otherwise.

report.best_score_selection_report module

class report.best_score_selection_report.BestScoreSelectionReport(fnames, scores, score_name, pvalues=None, selected_features=None, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports based on selecting the best scoring features. See Report See also KBestSelector and PercentileSelector.

Variables:
  • fnames (list) – The names of all the features.

  • scores (np.ndarray) – The feature-wise scores.

  • score_name (str) – The name of the score.

  • pvalues (np.ndarray or None) – The p-values, if available, i.e., can be None.

  • selected_features (list) – The indices or bool mask representing the selected features. This is an optional attribute, if it is not available, then selected features will not be reported.

__init__(fnames, scores, score_name, pvalues=None, selected_features=None, **kwargs)

Initialize an instance of BestScoreSelectionReport.

Parameters:
  • fnames – The names of all the features (OPTIONAL). If not given, the default will be f1, …, fn.

  • scores – The feature-wise scores.

  • score_name – The name of the score.

  • pvalues – The p-values (OPTIONAL).

  • selected_features – The indices or bool mask representing the selected features (OPTIONAL).

  • kwargs – The key-word arguments.

report.class_reduction_report module

class report.class_reduction_report.ClassReductionReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to class reductions. See Report. See also ClassReducer.

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.

  • class_groups (list of str) – List such that [i] is the list of original class names that were reduced to the reduced class i.

__init__(**kwargs)

Initialize an instance of ClassReductionReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

to_class_distribution(title, class_names, y)

Generate a string representing a class distribution.

Parameters:
  • title (str) – The title or name for the class distribution representation.

  • class_names (list of str) – The name for each class.

  • y (np.ndarray) – The class for each point.

Returns:

String representing a class distribution.

Return type:

str

report.classification_report module

class report.classification_report.ClassificationReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to classifications. See Report. See also ClassificationModel.

Variables:
__init__(**kwargs)

Initialize an instance of ClassificationReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

to_global_eval_string()

Generate the string representing the classification report with respect to the global evaluation.

Returns:

String representing the classification report with respect to the global evaluation.

to_class_eval_string()

Generate the string representing the classification report with respect to the class-wise evaluation.

Returns:

String representing the classification report with respect to the class-wise evaluation.

to_confusion_matrix_string()

Generate the string representing the classification report with respect to the confusion matrix.

Returns:

String representing the classification report with respect to the confusion matrix.

to_class_distribution_string()

Generate the string representing the classification report with respect to the class distribution.

Returns:

String representing the classification report with respect to the class distribution.

to_file(report_path, class_report_path=None, confusion_matrix_report_path=None, class_distribution_report_path=None, out_prefix=None)

Write the classification report to files.

Parameters:
Returns:

Nothing, the output is written to files.

has_global_eval_info()

Check whether the report contains information about the global evaluation.

Returns:

True if the report contains information about the global evaluation, False otherwise.

has_class_eval_info()

Check whether the report contains information about the class-wise evaluation.

Returns:

True if the report contains information about the class-wise evaluation, False otherwise.

has_confusion_matrix()

Check whether the report contains the confusion matrix.

Returns:

True if the report contains the confusion matrix, False otherwise.

has_class_distribution_info()

Check whether the report contains information about the class distribution.

Returns:

True if the report contains information about the class distribution, False otherwise.

report.classification_uncertainty_report module

class report.classification_uncertainty_report.ClassificationUncertaintyReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to the uncertainty of classified point clouds.

See Report.

Variables:
__init__(**kwargs)

Initialize an instance of ClassificationUncertaintyReport.

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • class_names (list) – The name for each class.

  • X (np.ndarray) – The matrix of coordinates representing the point cloud.

  • y (np.ndarray) – The vector of point-wise classes (reference).

  • yhat (np.ndarray) – The vector of predicted point-wise classes.

  • Zhat (np.ndarray) – The matrix of point-wise probabilities corresponding to the predicted classes.

  • pwise_entropy (np.ndarray) – The vector of point-wise Shannon’s entropy.

  • weighted_entropy (np.ndarray) – The vector of point-wise weighted Shannon’s entropy.

  • class_ambiguity (np.ndarray) – The vector of point-wise class ambiguities.

to_file(path, out_prefix=None)

Write the report (point cloud) to a file (LAS/LAZ).

Parameters:
  • path (str) – Path to the file where the report must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.classified_pcloud_report module

class report.classified_pcloud_report.ClassifiedPcloudReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to classified point clouds. See Report.

Variables:
  • X (np.ndarray) – The matrix of coordinates representing the point cloud.

  • y – The vector of expected classes.

  • yhat (np.ndarray) – The vector of point-wise predictions.

  • zhat (np.ndarray) – The matrix of point-wise softmax scores where the rows represent the points and the columns the classes. It can be None because it is a potential extra for the report but not essential to it.

  • class_names (list) – The name for each class.

Vartype:

np.ndarray

__init__(**kwargs)

Initialize an instance of ClassifiedPcloudReport.

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • X (np.ndarray) – The matrix of coordinates representing the point cloud.

  • y (np.ndarray) – The expected classes for each point in \(\pmb{X}\).

  • yhat (np.ndarray) – The vector of point-wise predictions.

  • zhat (np.ndarray) – The matrix of point-wise softmax (row-points, col-classes). It is OPTIONAL. When not given, it will not be considered in the report.

  • class_names (list) – The name for each class. If not given, they will be considered as C1, …, CN by default.

to_file(path, out_prefix=None)

Write the report (point cloud) to a file (LAS/LAZ).

Parameters:
  • path (str) – Path to the file where the report must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.deep_learning_model_summary_report module

class report.deep_learning_model_summary_report.DeepLearningModelSummaryReport(model, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports that summarize a deep learning model. See Report. See also SimpleDLModelHandler.

Variables:

model (keras.Model) – The model to be summarized (it does not need to be compiled but the architecture must have been built).

__init__(model, **kwargs)

Initialize an instance of DeepLearningModelSummaryReport.

Parameters:
  • model (keras.Model) – The model to be summarized.

  • kwargs – The key-word arguments.

report.distance_reclassification_report module

class report.distance_reclassification_report.DistanceReclassificationReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to distance reclassifications. See Report. See also DistanceReclassifier.

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 DistanceReclassificationReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

to_class_distribution(title, lut, y)

Generate a string representing a class distribution.

Parameters:
  • title (str) – The title or name for the class distribution representation.

  • lut (dict) – The look-up table whose keys are class names (string) and whose values are class indices (integer).

  • y (np.ndarray) – The vector of point-wise labels.

Returns:

String representing the class distribution.

Return type:

str

report.feature_processing_layer_report module

class report.feature_processing_layer_report.FeatureProcessingLayerReport(M, Omega, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports that represent a feature processing layer.

See Report. See also RBFFeatProcessingLayer.

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 FeatureProcessingLayerReport.

Parameters:

kwargs – The key-word arguments.

to_file(path, out_prefix=None)

Write the report (centers and sizes) to files.

Parameters:
  • path (str) – Path to the directory where the report files must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.features_structuring_layer_report module

class report.features_structuring_layer_report.FeaturesStructuringLayerReport(QX, omegaF, omegaD, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports that represent a features structuring layer.

See Report. See also FeaturesStructuringLayer.

Variables:
  • QX (np.ndarray) – The structure space matrix of the features structuring kernel.

  • omegaF (np.ndarray) – The vector feature-wise weights.

  • omegaD (np.ndarray) – The vector of distance-wise weights.

  • omegaD_name (str) – The name of the omegaD vector. It can be overriden to utilize the report for a RBFFeatExtractLayer.

__init__(QX, omegaF, omegaD, **kwargs)

Initialize an instance of FeaturesStructuringLayerReport.

Parameters:

kwargs – The key-word arguments.

to_file(path, out_prefix=None)

Write the report (point cloud, and ASCII vectors) to files.

Parameters:
  • path (str) – Path to the directory where the report files must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.hyper_search_report module

class report.hyper_search_report.HyperSearchReport(results, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to search-based hyperparameter tuning. See Report. See also HyperGridSearch and HyperRandomSearch.

Variables:

results – The results from a hyperparameter tuning optimization.

__init__(results, **kwargs)

Initialize an instance of HyperSearchReport.

Parameters:
  • results – The results from a hyperparameter tuning optimization.

  • kwargs – The key-word arguments defining the report’s attributes.

report.kfold_report module

class report.kfold_report.KFoldReport(mu, sigma, Q, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to k-folding. See Report. See also Model, model.Model.train_stratified_kfold, :class:().KFoldEvaluator`, and KFoldEvaluation.

Variables:
__init__(mu, sigma, Q, **kwargs)

Initialize an instance of KFoldReport.

Parameters:

report.kpconv_layer_report module

class report.kpconv_layer_report.KPConvLayerReport(Q, W, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports that represent a KPConv layer.

See Report. See also KPConvLayer.

Variables:
  • Q (np.ndarray) – The matrix of the kernel’s structure space.

  • W (np.ndarray) – The tensor whose slices are the matrices representing the weights of the kernel.

__init__(Q, W, **kwargs)

Initialize an instance of KPConvLayerReport.

Parameters:
  • Q (np.ndarray) – The kernel’s structure space.

  • W (np.ndarray) – The kernel’s weights.

  • kwargs – The key-word arguments.

to_file(path, out_prefix=None)

Write the report (structure and weights) to files.

Parameters:
  • path (str) – Path to the directory where the report files must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.light_kpconv_layer_report module

class report.light_kpconv_layer_report.LightKPConvLayerReport(Q, W, A, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports that represent a light KPConv layer.

See Report and KPConvLayerReport. See also LightKPConvLayer.

Variables:
  • Q (np.ndarray) – The matrix of the kernel’s structure space.

  • W (np.ndarray) – The matrix representing the weights.

  • A (np.ndarray) – The matrix of scale factors.

__init__(Q, W, A, **kwargs)

Initialize an instance of LightKPConvLayerReport.

Parameters:
  • Q (np.ndarray) – The kernel’s structure space.

  • W (np.ndarray) – The kernel’s weights.

  • A (np.ndarray) – The scale factors of the layer.

  • kwargs – The key-word arguments.

to_file(path, out_prefix=None)

Write the report (structure and weights) to files.

Parameters:
  • path (str) – Path to the directory where the report files must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.meta_report module

class report.meta_report.MetaReport(reports, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class for handling many reports at the same time.

Variables:

reports (dict) – The many reports in a dictionary. For each report there must be an entry specifying “name” as string, “report” as a Report derived object, and “path_key” as the key of the argument used to write the report to a file.

__init__(reports, **kwargs)

Root initialization for any instance of type Report.

Parameters:

kwargs – The attributes for the report.

to_file(path, out_prefix=None, **kwargs)

Write the many reports to their corresponding files.

Parameters:
  • path – The default path, i.e., the one associated with the “path” key.

  • out_prefix – The output prefix to expand the path (OPTIONAL).

  • kwargs – The key-word arguments. They must contain all relevant path specifications to handle each report.

Returns:

Nothing, the output is written to the corresponding files.

report.minmax_normalization_report module

class report.minmax_normalization_report.MinmaxNormalizationReport(fnames, fmin, fmax, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to MinmaxNormalization. See Report. See also MinmaxNormalizer.

Variables:
  • fnames (list) – The names of the features.

  • fmin (np.ndarray) – The feature-wise min values.

  • fmax (np.ndarray) – The feature-wise max values.

  • frange (np.ndarray) – The feature-wise range values, i.e., max-min.

__init__(fnames, fmin, fmax, **kwargs)

Initialize an instance of MinmaxNormalizationReport

Parameters:
  • fnames (list) – The names of the features.

  • fmin (np.ndarray) – The feature-wise min values.

  • fmax (np.ndarray) – The feature-wise max values.

  • kwargs – The key-word arguments.

Keyword Arguments:
  • range (np.ndarray) – The feature-wise range values, i.e., max-min.

report.pca_projection_report module

class report.pca_projection_report.PCAProjectionReport(pca_names, expl_var_ratio, in_dim, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to PCA projection. See Report. See also VarianceSelector.

Variables:
  • pca_names (list) – The names of the PCA-derived features.

  • expl_var_ratio (np.ndarray) – The vector which components represent the explained variance ratio.

  • in_dim (int) – The input dimensionality, i.e., the number of features before the PCA projection.

Parameters:

kwargs – The key-word arguments.

__init__(pca_names, expl_var_ratio, in_dim, **kwargs)

Initialize an instance of PCAProjectionReport.

Parameters:
  • pca_names (list) – The names of the PCA-derived features.

  • expl_var_ratio (np.ndarray) – The vector which components represent the explained variance ratio.

  • in_dim (int) – The input dimensionality, i.e., the number of features before the PCA projection.

  • kwargs – The key-word arguments.

report.pwise_activations_report module

class report.pwise_activations_report.PwiseActivationsReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to point-wise activations. See Report.

Variables:
  • X (np.ndarray) – The matrix of coordinates representing the point cloud.

  • activations (np.ndarray) – The matrix of features representing the point-wise activations.

  • y (np.ndarray) – The vector of expected classes.

__init__(**kwargs)

Initialize an instance of PwiseActivationsReport

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • X (np.ndarray) – The matrix of coordinates representing the point cloud.

  • activations (np.ndarray) – The matrix of features representing the point-wise activations.

  • y (np.ndarray) – The expected classes for each point in \(\pmb{X}\).

to_file(path, out_prefix=None)

Write the report (point cloud) to a file (LAZ). :param path: Path to the file where the report must be written. :type path: str :param out_prefix: The output prefix to expand the path (OPTIONAL). :type out_prefix: str :return: Nothing, the output is written to a file.

report.rand_forest_report module

class report.rand_forest_report.RandForestReport(importance, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to trained random forest models. See Report. See also RandomForestClassificationModel.

Variables:
  • importance (np.ndarray) – The vector of feature-wise importance.

  • permutation_importance_mean (np.ndarray) – The vector of feature-wise mean permutation importance. It can be None, i.e., it is optional.

  • permutation_importance_stdev (np.ndarray) – The vector representing the standard deviations of permutation importance. It can be None, i.e., it is optional.

  • fnames (list) – The names of the features.

__init__(importance, **kwargs)

Initialize an instance of RandForestReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

report.receptive_field_oversampling_report module

class report.receptive_field_oversampling_report.ReceptiveFieldOversamplingReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handel reports related to receptive field oversampling. See Report.

Variables:
  • X (list of np.ndarray) – The structure space matrix of the oversampled receptive field.

  • Y (list of np.ndarray) – The structure space matrix for each receptive field, after the oversampling.

__init__(**kwargs)

Initialize an instance of ReceptiveFieldOversamplingReport.

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • X (list np.ndarray) – The structure space matrices before the oversampling.

  • Y (list of np.ndarray) – The structure space matrices after the oversampling.

  • id (int or str or None) – See ReceptiveField.fit().

to_file(path, out_prefix=None)

Write the report (oversampled receptive fields as point clouds) to files (LAZ).

Parameters:
  • path (str) – Path to the directory where the reports must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.receptive_fields_distribution_report module

class report.receptive_fields_distribution_report.ReceptiveFieldsDistributionReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to the distribution of predicted or expected values in the receptive fields. See Report

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 an instance of ReceptiveFieldsDistributionReport.

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • 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 (np.ndarray) – The name representing each class.

static count(rf, cidx, num_cases, num_rf)

Method to count the cases among all receptive fields and also how many receptive fields contain at least a single case of current class.

Parameters:
  • rf – The receptive field (either for expected or predicted values).

  • cidx – The index of the current class to consider for counting.

  • num_cases – How many total cases, considering all classes, there are.

  • num_rf – How any receptive fields there are.

Returns:

The absolute frequency of cases of current class among all receptive fields, the corresponding relative frequency, the absolute frequency receptive fields containing at least one case of current class, and the corresponding relative frequency.

report.receptive_fields_report module

class report.receptive_fields_report.ReceptiveFieldsReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to receptive fields. See Report.

Variables:
  • X_rf (np.ndarray) – The matrix of coordinates for each receptive field.

  • F_rf (np.ndarray) – The matrix of features for each receptive field.

  • zhat_rf (np.ndarray) – The softmax scores for the predictions on each receptive field.

  • yhat_rf (np.ndarray) – The predictions for each receptive field.

  • y_rf (np.ndarray or None) – The expected values for each receptive field (can be None).

  • class_names (list) – The names representing each class.

__init__(**kwargs)

Initialize an instance of ReceptiveFieldsReport.

Parameters:

kwargs – The key-word arguments.

Keyword Arguments:
  • X_rf (np.ndarray) – The matrix of coordinates for each receptive field.

  • F_rf (np.ndarray) – The matrix of features for each receptive field.

  • zhat_rf (np.ndarray) – The softmax scores for the predictions on each receptive field.

  • yhat_rf (np.ndarray) – The predictions for each receptive field.

  • y_rf (np.ndarray) – The expected values for each receptive field (OPTIONAL).

  • class_names (list) – The name representing each class (OPTIONAL). If not given, C0, …, CN will be used by default.

to_file(path, out_prefix=None)

Write the report (receptive fields as point clouds) to files (LAZ).

Parameters:
  • path (str) – Path to the directory where the reports must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.regression_report module

class report.regression_report.RegressionReport(**kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to regressions. See Report. See also RegressionModel.

Variables:
  • X (np.ndarray) – The point cloud’s structure space, typically a matrix of 3D point-wise coordinates where the rows are the points and the columns the coordinates \((x, y, z)\).

  • header – The header for the output point cloud file.

  • quantities (dict) – The dictionary with the quantities from the point cloud.

  • errors (dict) – The dictionary with the errors for each case.

  • metrics (dict) – The dictionary with the metrics summarizing the regression evaluation for each estimation.

  • outers (dict) – The dictionary with the outer correlations summarizing the relationship between the errors and arbitrary point-wise features.

  • distribution (dict) – The QQ distribution where the reference and the predictions are represented through its percentiles, as a dictionary.

__init__(**kwargs)

Initialize an instance of RegressionReport.

Parameters:

kwargs – The key-word arguments defining the report’s attributes.

to_regression_eval_string()

Generate the string representing the report evaluating the regressions.

Returns:

String representing the report evaluating the regressions.

to_outer_correlation_string()

Generate the string representing the report about correlations between the errors and arbitrary point-wise features.

Returns:

String representing the report about outer correlations.

to_QQ_distribution_string()

Generate the string representing the report about the QQ distributions involving the references and the predictions.

Returns:

String representing the report about the QQ distributions.

to_file(regression_report_path, outer_report_path=None, distribution_report_path=None, regression_pcloud_path=None, out_prefix=None)

Write the regression report to files.

Parameters:
Returns:

Nothing, the output is written to files.

has_regression_eval_info()

Check whether the report contains information about the evaluation of the regressions.

Returns:

True if the report contains information about the evaluation of the regressions, False otherwise.

has_outer_correlation_info()

Check whether the report contains information about correlations with outer features, i.e., arbitrary point-wise features not necessarily involved in the error quantification.

Returns:

True if the report contains information about correlations with outer features, False otherwise.

has_QQ_distribution_info()

Check whether the report contains information about the QQ distribution (where the percentiles are the considered quantiles).

Returns:

True if the report contains information about the QQ distribution, False otherwise.

report.report module

exception report.report.ReportException(message='')

Bases: VL3DException

Author:

Alberto M. Esmoris Pena

Class for exceptions related to report components. See VL3DException

__init__(message='')
class report.report.Report(**kwargs)

Bases: object

Author:

Alberto M. Esmoris Pena

Abstract class providing the interface governing any report.

__init__(**kwargs)

Root initialization for any instance of type Report.

Parameters:

kwargs – The attributes for the report.

to_string()

Wrapper for report.Report.__str__().

to_file(path, out_prefix=None)

Write the report to a file.

Parameters:
  • path (str) – Path to the file where the report must be written.

  • out_prefix (str) – The output prefix to expand the path (OPTIONAL).

Returns:

Nothing, the output is written to a file.

report.standardization_report module

class report.standardization_report.StandardizationReport(fnames, sigma, mu, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to Standardization. See Report. See also Standardizer.

Variables:
  • fnames (list) – The names of the features.

  • sigma (np.ndarray) – The vector of feature-wise standard deviations.

  • mu (np.ndarray) – The vector of feature-wise means.

__init__(fnames, sigma, mu, **kwargs)

Initialize an instance of StandardizationReport.

Parameters:
  • fnames (list) – The names of the features.

  • sigma (np.ndarray) – The vector of feature-wise standard deviations.

  • mu (np.ndarray) – The vector of feature-wise means.

  • kwargs – The key-word arguments.

report.training_history_report module

class report.training_history_report.TrainingHistoryReport(history, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to report (potentially many metrics) the training history of a deep learning model, i.e., neural networks.

Variables:

history (keras.callbacks.History) – The history.

__init__(history, **kwargs)

Initialize an instance of TrainingHistoryReport.

Parameters:
  • history (keras.callbacks.History)

  • kwargs – The key-word arguments.

report.variance_selection_report module

class report.variance_selection_report.VarianceSelectionReport(fnames, variances, selected_features=None, **kwargs)

Bases: Report

Author:

Alberto M. Esmoris Pena

Class to handle reports related to variance selection. See Report. See also VarianceSelector.

Variables:
  • fnames (list) – The names of all the features.

  • variances (np.ndarray) – The feature-wise variances.

  • selected_features (list) – The indices or bool mask representing the selected features. This is an optional attribute, if it is not available, then selected features will not be reported.

__init__(fnames, variances, selected_features=None, **kwargs)

Initialize an instance of VarianceSelectionReport.

Parameters:
  • fnames – The names of all the features (OPTIONAL). If not given, the default will be f1, …, fn.

  • variances – The feature-wise variances.

  • selected_features – The indices or bool mask representing the selected features (OPTIONAL).

  • kwargs – The key-word arguments.

Module contents

author:

Alberto M. Esmoris Pena

The report package contains the logic to report relevant information derived from the data, the models, and their evaluations. Reports can be text-based, but they can also be represented as point clouds. However, reports are not typically figures, since figures are handled by the plot package instead.