-
Notifications
You must be signed in to change notification settings - Fork 372
Labels
bugSomething isn't workingSomething isn't workingcustomer choiceRelated to customer choice moduleRelated to customer choice modulegood first issueGood for newcomers . Doesn't require extensive knowledge of the repo and packageGood for newcomers . Doesn't require extensive knowledge of the repo and packageplots
Description
Same issue with this : pandas-dev/pandas#54485
pymc-marketing/pymc_marketing/customer_choice/mv_its.py
Lines 546 to 564 in 488ac3c
| self.plot_data(ax=ax, plot_total_sales=plot_total_sales) | |
| # plot posterior predictive distribution of sales for each of the existing products | |
| x = cast(pd.DataFrame, self.X).index.values | |
| existing_products = self.coords["existing_product"] | |
| for i, existing_product in enumerate(existing_products): | |
| az.plot_hdi( | |
| x, | |
| self.predictions[variable] # type: ignore | |
| .transpose(..., "time") | |
| .sel(existing_product=existing_product), | |
| fill_kwargs={ | |
| "alpha": HDI_ALPHA, | |
| "color": f"C{i}", | |
| "label": "Posterior predictive (HDI)", | |
| }, | |
| smooth=False, | |
| ) | |
By not using the plot method of pandas, we can get away from this as shown in the linked pandas issue
pymc-marketing/pymc_marketing/customer_choice/mv_its.py
Lines 741 to 743 in 488ac3c
| data.plot(ax=ax) | |
| if plot_total_sales: | |
| data.sum(axis=1).plot(label="total sales", color="black", ax=ax) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcustomer choiceRelated to customer choice moduleRelated to customer choice modulegood first issueGood for newcomers . Doesn't require extensive knowledge of the repo and packageGood for newcomers . Doesn't require extensive knowledge of the repo and packageplots