mbgcnbd.PlotRecVsConditionalExpectedFrequency | R Documentation |
Plots the actual and conditional expected number transactions made by customers in the holdout period, binned according to calibration period recencies, and returns this comparison in a matrix.
mbgcnbd.PlotRecVsConditionalExpectedFrequency(
params,
cal.cbs,
T.star,
x.star,
xlab = "Calibration period recency",
ylab = "Holdout period transactions",
xticklab = NULL,
title = "Actual vs. Conditional Expected Transactions by Recency"
)
bgcnbd.PlotRecVsConditionalExpectedFrequency(
params,
cal.cbs,
T.star,
x.star,
xlab = "Calibration period recency",
ylab = "Holdout period transactions",
xticklab = NULL,
title = "Actual vs. Conditional Expected Transactions by Recency"
)
params |
A vector with model parameters |
cal.cbs |
Calibration period CBS (customer by sufficient statistic). It must contain columns for frequency ('x'), recency ('t.x') and total time observed ('T.cal'). |
T.star |
Length of the holdout period. |
x.star |
Vector of transactions made by each customer in the holdout period. |
xlab |
Descriptive label for the x axis. |
ylab |
Descriptive label for the x axis. |
xticklab |
A vector containing a label for each tick mark on the x axis. |
title |
Title placed on the top-center of the plot. |
Matrix comparing actual and conditional expected transactions in the holdout period.
bgcnbd.PlotFreqVsConditionalExpectedFrequency
## Not run:
data("groceryElog")
cbs <- elog2cbs(groceryElog, T.cal = "2006-09-30")
params <- mbgcnbd.EstimateParameters(cbs, k=2)
mbgcnbd.PlotRecVsConditionalExpectedFrequency(params, cbs, T.star=52, cbs$x.star)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.