utils#

Utilities for the CLV module.

Functions

clv_summary(*args, **kwargs)

customer_lifetime_value(transaction_model, data)

Compute customer lifetime value.

rfm_segments(transactions, customer_id_col, ...)

Assign customers to segments based on spending behavior derived from RFM scores.

rfm_summary(transactions, customer_id_col, ...)

Summarize transaction data for use in CLV modeling or RFM segmentation.

rfm_train_test_split(transactions, ...[, ...])

Summarize transaction data and split into training and tests datasets for CLV modeling.

to_xarray(customer_id, *arrays[, dim])

Convert vector arrays to xarray with a common dim (default "customer_id").