pdstools.valuefinder.Plots

Attributes

Classes

Plots

Plots.

Module Contents

logger
COLORSCALE_TYPES
T
P
class Plots(vf: pdstools.valuefinder.ValueFinder.ValueFinder)

Bases: pdstools.utils.namespaces.LazyNamespace

Plots.

Parameters:

vf (pdstools.valuefinder.ValueFinder.ValueFinder)

dependencies: ClassVar[list[str]] = ['plotly']
dependency_group = 'adm'
vf
funnel_chart(by: str, query: pdstools.utils.types.QUERY | None = None, return_df: Literal[False] = False) → pdstools.utils.plot_utils.Figure
funnel_chart(by: str, query: pdstools.utils.types.QUERY | None = None, return_df: Literal[True] = True) → polars.LazyFrame

Funnel chart.

propensity_distribution(sample_size: int = 10000, *, max_points_per_group: int | None = DEFAULT_PLOT_POINTS_PER_GROUP) → pdstools.utils.plot_utils.Figure

Plot the propensity distribution for each stage.

Parameters:
  • sample_size (int, default 10000) – Number of rows per stage used to estimate the density.

  • max_points_per_group (int or None, default 250) – Maximum number of box-plot values per stage. None plots all sampled values.

Returns:

Propensity density and box plots.

Return type:

Figure

propensity_threshold(sample_size: int = 10000, stage: str = 'Eligibility', *, max_points_per_group: int | None = DEFAULT_PLOT_POINTS_PER_GROUP) → pdstools.utils.plot_utils.Figure

Plot propensity distributions against the configured threshold.

Parameters:
  • sample_size (int, default 10000) – Number of rows used to estimate the density.

  • stage (str, default "Eligibility") – Stage whose propensity values are plotted.

  • max_points_per_group (int or None, default 250) – Maximum number of histogram values per propensity type. None plots all sampled values.

Returns:

Propensity density and histogram plots.

Return type:

Figure

pie_charts(*, thresholds: collections.abc.Iterable[float] | None = None, quantiles: collections.abc.Iterable[float] | None = None, rounding: int = 3)

Pie charts.

Parameters:
distribution_per_threshold(*, thresholds: collections.abc.Iterable[float] | None = None, quantiles: collections.abc.Iterable[float] | None = None, rounding: int = 3)

Distribution per threshold.

Parameters: