Function to train model
1 | trainModel(data, paramsInit = c(1, 1, 1, 1), lambda = 0, ...)
|
data |
An integer matrix where each row consists of the recency/frequency statistics for a single user, in the order (x, n, m) |
paramsInit |
A length-4 numeric vector of initial parameters for the log likelihood function. (alpha, beta, gamma, delta) |
lambda |
Regularization parameter to pass to cost and cost_d |
... |
Additional arguments to pass to stats::optim |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.