valpas.visualization.ppv_comparison_heatmap.create_ppv_heatmap#
- valpas.visualization.ppv_comparison_heatmap.create_ppv_heatmap(data, title='Mean Positive Predictive Value for Top 1000 Predictions', figsize=(12, 8), colormap='custom', annotate=True, annotation_format='.3f', value_range=None, highlight_best=True, highlight_threshold=None, save_path=None, dpi=300, show_colorbar=True, font_sizes=None, border_color='white', border_width=0.5, round_corners=False, add_significance_markers=False, significance_data=None, custom_colors=None)#
Create a publication-quality heatmap for PPV results
- Parameters:
data (DataFrame) – DataFrame with input types as rows, association metrics as columns
title (str) – Title for the heatmap
figsize (Tuple[int, int]) – Figure size (width, height)
colormap (str) – Colormap to use (‘custom’, ‘viridis’, ‘plasma’, ‘RdYlBu_r’, etc.)
annotate (bool) – Whether to show values in cells
annotation_format (str) – Format string for cell annotations
value_range (Tuple[float, float]) – Tuple of (min, max) for color scale
highlight_best (bool) – Whether to highlight best performing cells
highlight_threshold (float) – Threshold above which to highlight cells
save_path (str | None) – Path to save the figure
dpi (int) – Resolution for saved figure
show_colorbar (bool) – Whether to show the colorbar
font_sizes (Dict[str, int]) – Dictionary with font sizes for different elements
border_color (str) – Color of cell borders
border_width (float) – Width of cell borders
round_corners (bool) – Whether to use rounded corners (experimental)
add_significance_markers (bool) – Whether to add significance markers
significance_data (DataFrame) – DataFrame with significance values (p-values)
custom_colors (Dict[str, str]) – Dictionary for custom color scheme
- Returns:
Tuple of (figure, axes) objects
- Return type:
Tuple[Figure, Axes]