drop.nonessential.matrices | R Documentation |
Drops all the matrices in the model object which are not used for calculating new user factors (either warm or cold), such as the user biases or the item factors.
This is intended at decreasing memory usage in production systems which use this software for calculation of user factors or top-N recommendations.
Can additionally drop some of the precomputed matrices which are only taken in special circumstances such as when passing dense data with no missing values - however, predictions that would have otherwise used these matrices will become slower afterwards.
After dropping these non-essential matrices, it will not be possible anymore to call certain methods such as 'predict' or 'swap.users.and.items'. The methods which are intended to continue working afterwards are:
factors_single
factors
topN_new
This method is only available for 'CMF' and 'CMF_implicit' model objects.
drop.nonessential.matrices(model, drop_precomputed = TRUE)
model |
A model object as returned by CMF or CMF_implicit. |
drop_precomputed |
Whether to drop the less commonly used prediction matrices (see documentation above for more details). |
After calling this function and reassigning the output to the original model object, one might need to call the garbage collector (by running 'gc()') before any of the freed memory is shown as available.
The model object with the non-essential matrices dropped.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.