ReportManager#
- class ReportManager(result_dir: str, experiment_paths: dict, output_structure: dict, description_map: dict)#
Create HTML reports from evaluation results.
- Parameters:
- result_dirstr
Directory containing evaluation results
- experiment_pathsdict
Mapping of experiment groups to their file paths
- output_structuredict
Structure definition for output report
- description_mapdict
Mapping of objects to their descriptions
- Attributes:
- result_dirstr
Directory containing evaluation results
- templates_dirstr
Directory containing HTML templates
- styles_dirstr
Directory containing CSS styles
- report_dirstr
Directory for generated HTML report
- experiment_pathsdict
Mapping of experiment groups to their file paths
- envjinja2.Environment
Jinja2 environment for rendering templates
- method_mapOrderedDict
Maps EvaluationManager methods to their reporting functions
- continuous_data_mapOrderedDict
Maps continuous data files to reporting functions
- categorical_data_mapOrderedDict
Maps categorical data files to reporting functions
- current_datasetstr or None
Name of dataset currently being processed
- summary_metricsdefaultdict
Nested dictionary of summary metrics
- output_structuredict
Maps experiment groups to their datasets
- description_mapdict
Mapping of experiment groups to their descriptions
- create_dataset_page(group_name: str, dataset_name: str) None#
Creates an HTML page showing data split distribution information.
- Parameters:
- group_namestr
Name of the experiment group
- dataset_namestr
Name of the dataset
- create_experiment_page(experiment_dir: str, dataset: str, navigation: dict) None#
Create HTML page for a single experiment.
- Parameters:
- experiment_dirstr
Directory containing experiment results
- datasetstr
Name of the dataset used
- navigationdict
Navigation links for previous/next experiments
- create_report() None#
Generate the complete HTML report.
Creates index page and all experiment pages, copies required CSS files, and generates navigation structure.
- generate_summary_tables() str#
Generates sortable HTML summary tables for each dataset, displaying model metrics.
- Returns:
- str
HTML block containing sortable summary tables for all datasets
- get_default_params(model_class: Type) dict#
Extracts default parameters from the model class.
- Parameters:
- model_classType
The class of the model
- Returns:
- dict
A dictionary of default parameters
- report_categorical_stats(file_path: str) str#
Generate HTML for categorical feature statistics.
- Parameters:
- file_pathstr
Path to JSON file containing categorical statistics
- Returns:
- str
HTML content showing statistics and pie charts
- report_compare_models(data: dict, metadata: dict) str#
Generates an HTML block for displaying model comparison results.
- Parameters:
- datadict
The comparison results
- metadatadict
The metadata containing model information
- Returns:
- str
HTML block representing the comparison results
- report_confusion_matrix(data: dict, metadata: dict) str#
Generates an HTML block for displaying the confusion matrix results.
- Parameters:
- datadict
The confusion matrix data, including the matrix itself and labels
- metadatadict
The metadata associated with the matrix
- Returns:
- str
HTML block representing the confusion matrix results
- report_continuous_stats(file_path: str) str#
Generate HTML for continuous feature statistics.
- Parameters:
- file_pathstr
Path to JSON file containing continuous statistics
- Returns:
- str
HTML content showing statistics and distribution plots
- report_correlation_matrix(file_path: str) str#
Generate HTML for feature correlation matrix.
- Parameters:
- file_pathstr
Path to correlation matrix image
- Returns:
- str
HTML content showing correlation heatmap
- report_evaluate_model(data: dict, metadata: dict) str#
Generates an HTML block for displaying evaluate_model results.
- Parameters:
- datadict
The evaluation data
- metadatadict
The metadata associated with the evaluation
- Returns:
- str
HTML block representing the evaluation results
- report_evaluate_model_cv(data: dict, metadata: dict) str#
Generates an HTML block for displaying cross-validated evaluation results.
- Parameters:
- datadict
The evaluation data containing metric information
- metadatadict
The metadata associated with the evaluation
- Returns:
- str
HTML block representing the cross-validation results
- report_image(data: str, metadata: dict, title: str, max_width: str = '100%') str#
Generates an HTML block for displaying an image plot.
- Parameters:
- datastr
The path to the image file
- metadatadict
The metadata associated with the plot
- titlestr
The title to display above the image
- max_widthstr, optional
The maximum width of the image. Defaults to “100%”.
- Returns:
- str
HTML block containing the image and its metadata
- report_serialized_model(data: dict, metadata: dict) str#
Generate an HTML section describing a serialized model.
- Parameters:
- datadict
The loaded joblib object containing the model
- metadatadict
The metadata containing model information
- Returns:
- str
HTML formatted string describing the model