This is an auxiliary function to fim_nb(). It calculates \prod_j p(x_ij|y=k) for a single data point and store it in a vector for future use. It is mainly for speed up the calculation of fim_nb(). Notice that this function is almost the same as p_ijk(), except that this function calculte the product over all input variables x_j.
1 | prod_pijk(dataPoint, pars, xIndices, yValue)
|
dataPoint |
A single data point in the given data set. |
pars |
A list of MLE of NB parameters. |
xIndices |
A vector of input variables' indices. |
yValue |
The value of the output variable. The current version of mml_nb only takes binar variables, so the possible y values are 0, 1. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.