pdstools.adm.Plots._helpers

Shared helpers for the pdstools.adm.Plots package.

Contains the requires decorator (column-presence guard for plot methods), the MetricLimits annotation helper, and small plotly building blocks reused by multiple mixins.

Attributes

Functions

requires([model_columns, predictor_columns, ...])

add_bottom_left_text_to_bubble_plot(fig, df, bubble_size)

add_metric_limit_lines(→ pdstools.utils.plot_utils.Figure)

Add dashed lines at MetricLimits thresholds (red=hard, green=best practice).

distribution_graph(df, title)

Module Contents

logger
COLORSCALE_TYPES
T
P
requires(model_columns: collections.abc.Iterable[str] | None = None, predictor_columns: collections.abc.Iterable[str] | None = None, combined_columns: collections.abc.Iterable[str] | None = None)
Parameters:
add_bottom_left_text_to_bubble_plot(fig: pdstools.utils.plot_utils.Figure, df: polars.LazyFrame, bubble_size: int)
Parameters:
add_metric_limit_lines(fig: pdstools.utils.plot_utils.Figure, metric_id: str = 'ModelPerformance', scale: float = 100.0, orientation: str = 'vertical') pdstools.utils.plot_utils.Figure

Add dashed lines at MetricLimits thresholds (red=hard, green=best practice).

Parameters:
Return type:

pdstools.utils.plot_utils.Figure

distribution_graph(df: polars.LazyFrame, title: str)
Parameters:
  • df (polars.LazyFrame)

  • title (str)