pdstools.valuefinder.Aggregates

Classes

Module Contents

class Aggregates(vf: pdstools.valuefinder.ValueFinder.ValueFinder)
Parameters:

vf (pdstools.valuefinder.ValueFinder.ValueFinder)

vf
_quantile_from_threshold: Dict[float, float]
get_customer_summary(*, threshold: float | None = None) polars.LazyFrame

Computes the summary of propensities for all customers

Parameters:
  • th (Optional[float]) – The threshold to consider an action ‘good’. If a customer has actions with propensity above this, the customer has at least one relevant action. If not given, will default to 5th quantile.

  • threshold (Optional[float])

Return type:

polars.LazyFrame

get_counts_per_stage(*, threshold: float | None = None)
Parameters:

threshold (Optional[float])

property max_propensity_per_customer: polars.DataFrame
Return type:

polars.DataFrame

get_threshold_from_quantile(quantile: float) float
Parameters:

quantile (float)

Return type:

float

get_counts_for_threshold(threshold: float) polars.DataFrame
Parameters:

threshold (float)

Return type:

polars.DataFrame