pat2vec.util.evaluation_methods_ploting
Functions
|
Generates and saves pie charts of annotation distributions for each client. |
|
Plots the calibration curve (reliability diagram). |
|
Plots a confusion matrix heatmap. |
|
Plots feature importances as a horizontal bar chart. |
|
Plots a heatmap of missing data patterns. |
|
Plots the Precision-Recall curve. |
|
Plots the Receiver Operating Characteristic (ROC) curve. |
- pat2vec.util.evaluation_methods_ploting.plot_roc_curve(y_true, y_score, model_name, config)[source]
Plots the Receiver Operating Characteristic (ROC) curve.
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.plot_precision_recall_curve(y_true, y_score, model_name, config)[source]
Plots the Precision-Recall curve.
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.plot_calibration_curve(y_true, y_prob, model_name, config)[source]
Plots the calibration curve (reliability diagram).
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.plot_feature_importance(importances, model_name, config)[source]
Plots feature importances as a horizontal bar chart.
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.plot_confusion_matrix(y_true, y_pred, model_name, config)[source]
Plots a confusion matrix heatmap.
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.plot_missing_data_patterns(df, model_name, config)[source]
Plots a heatmap of missing data patterns.
- Return type:
None
- pat2vec.util.evaluation_methods_ploting.generate_pie_charts(all_batch_annots, save_plots=True, types=None, output_folder='plot_outputs_folder_piechart')[source]
Generates and saves pie charts of annotation distributions for each client.
For each unique client_idcode in the input DataFrame, this function creates pie charts summarizing the distribution of pretty_name for annotations. It generates one chart for all annotation types combined and separate charts for each type specified in the types list.
To improve readability, concepts in the bottom 25th percentile by count are grouped into an “other” category.
- Parameters:
all_batch_annots (
DataFrame) – DataFrame containing annotation data with columns like ‘client_idcode’, ‘pretty_name’, and ‘types’.save_plots (
bool) – If True, saves the charts as PNG files in a local ‘plot_outputs_folder_piechart’ directory.output_folder (
str) – Directory to save plots in. Defaults to ‘plot_outputs_folder_piechart’.types (
Optional[List[str]]) – A list of annotation types (e.g., “[‘disorder’]”) to generate separate pie charts for. Defaults to a predefined list of common types.
- Return type:
None