Skip to content

Frequency/Recency Matrix plot is not working #1

@Libardo1

Description

@Libardo1

this command is not running.
clv.plot_frequency_recency_matrix(bgm, t=365);
This is the error.

`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
in <cell line: 4>()
2 # This matrix helps in identifying patterns like potentially "at-risk" customers who might churn.
3
----> 4 clv.plot_frequency_recency_matrix(bgm, t=365);

/usr/local/lib/python3.10/dist-packages/pymc_marketing/clv/plotting.py in plot_frequency_recency_matrix(model, t, max_frequency, max_recency, title, xlabel, ylabel, ax, **kwargs)
198 """
199 if max_frequency is None:
--> 200 max_frequency = int(model.frequency.max())
201
202 if max_recency is None:

AttributeError: 'BetaGeoModel' object has no attribute 'frequency'`
I would appreciate any hint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions