Description Usage Arguments Details Value Author(s) See Also
This function estimates the random-access memory (RAM) required to
update a given model and data with PMC
.
Warning: Unwise use of this function may crash a computer, so please read the details below.
1 | PMC.RAM(Model, Data, Iterations, Thinning, M, N)
|
Model |
This is a model specification function. For more
information, see |
Data |
This is a list of Data. For more information, see
|
Iterations |
This is the number of iterations for which
|
Thinning |
This is the amount of thinning applied to the samples
in |
M |
This is the number of mixture components in
|
N |
This is the number of samples in |
The PMC.RAM
function uses the
object.size
function to estimate the size in MB of RAM
required to update in PMC
for a given model and data,
and for a number of iterations and specified thinning. When RAM is
exceeded, the computer will crash. This function can be useful when
trying to estimate how many samples and iterations to update a
model without crashing the computer. However, when estimating the
required RAM, PMC.RAM
actually creates several large
objects, such as post
(see below). If too many iterations are
given as an argument to PMC.RAM
, for example, then it
will crash the computer while trying to estimate the required RAM.
The best way to use this function is as follows. First, prepare the model specification and list of data. Second, observe how much RAM the computer is using at the moment, as well as the maximum available RAM. The majority of the difference of these two is the amount of RAM the computer may dedicate to updating the model. Next, use this function with a small number of iterations. Note the estimated RAM. Increase the number of iterations, and again note the RAM. Continue to increase the number of iterations until, say, arbitrarily within 90% of the above-mentioned difference in RAM.
The computer operating system uses RAM, as does any other software
running at the moment. R is currently using RAM, and other functions
in the LaplacesDemon
package, and any other package that is
currently activated, are using RAM. There are numerous small objects
that are not included in the returned list, that use RAM. For example,
perplexity is a small vector, etc.
A potentially large objects that is not included is a matrix used for
estimating LML
.
PMC.RAM
returns a list with several components. Each component
is an estimate in MB for an object. The list has the following
components:
alpha |
This is the estimated size in MB of RAM required for the matrix of mixture probabilities by iteration. |
Covar |
This is the estimated size in MB of RAM required for the covariance matrix or matrices. |
Data |
This is the estimated size in MB of RAM required for the list of data. |
Deviance |
This is the estimated size in MB of RAM required for the deviance vector before thinning. |
Initial.Values |
This is the estimated size in MB of RAM required for the matrix or vector of initial values. |
LH |
This is the estimated size in MB of RAM required for the
N x T x M array |
LP |
This is the estimated size in MB of RAM required for the
N x T x M array |
Model |
This is the estimated size in MB of RAM required for the model specification function. |
Monitor |
This is the estimated size in MB of RAM required for
the N x J matrix |
Posterior1 |
This is the estimated size in MB of RAM required for
the N x J x T x M array
|
Posterior2 |
This is the estimated size in MB of RAM required for
the N x J matrix |
Summary |
This is the estimated size in MB of RAM required for the summary table. |
W |
This is the estimated size in MB of RAM required for the matrix of importance weights. |
Total |
This is the estimated size in MB of RAM required in total
to update with |
Statisticat, LLC. software@bayesian-inference.com
BigData
,
LML
,
object.size
, and
PMC
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.