Skip to contents

Shows estimated memory usage for networks of given size, with the levers that reduce the memory of a fit.

Usage

ame_memory_settings(n_nodes, R = 2)

Arguments

n_nodes

Number of nodes in network

R

Rank of multiplicative effects (default: 2)

Value

Invisibly returns memory estimates

Details

Memory levers available in the package:

  • Run compact_ame() on a fitted model to drop empty slots and, for genuinely sparse posterior means, use sparse storage via use_sparse_matrices = TRUE

  • Increase odens in ame()/lame() to store fewer posterior draws

  • Pass posterior_opts = list(thin_UV = ..., thin_ab = ...) to thin the stored latent-factor and additive-effect draws

Author

Cassy Dorff, Shahryar Minhas, Tosin Salau

Examples

ame_memory_settings(n_nodes = 12, R = 1)
#> 
#> ── Memory Usage Estimates for n=12 Network 
#> Estimated memory usage:
#> - Each n x n matrix: 0 MB
#> - Factor matrices (U,V): 0 MB
#> 
#> - All posterior-mean matrices (YPM, EZ, UVPM): 0 MB
#> 
#> Recommendations:
#> - Run `compact_ame()` on the fitted model to drop empty slots.
#> - Increase `odens` to store fewer posterior draws.
#> - Pass `posterior_opts = list(thin_UV = ..., thin_ab = ...)` to thin stored
#> latent-factor and additive-effect draws.