init_lv | R Documentation |
Initialize latent variable with GLRM or PCA.
init_lv(
X,
minprop = 0.2,
terms,
method = c("pca", "glrm"),
k = 5,
nRounds = 1,
nMax = NULL,
nRand = 1,
h2o.init.args,
h2o.glrm.args,
seed = NULL,
...
)
X |
A matrix of observations that are 0, 1 or |
minprop |
The proportion voting in the minority that serves as the
cutoff. Votes with fewer than n times |
terms |
A vector of values identifying the term in which the vote was taken. |
method |
A character - either "pca" or "glrm" identifying the default method for initializing the latent variable. |
k |
Scalar giving the number of dimensions to be estimated. Note, this does not necessarily have to be the same as the number of dimensions estimated in the final model. |
nRounds |
Number of rounds of GLRM. If this is 1, then all bills are
fed into the GLRM. If ths is greater than 1, then |
nMax |
Maximum number of bills to take per term if |
nRand |
Number of random samples from the input matrix to use in producing the output. |
h2o.init.args |
A list of arguments to be passed to |
h2o.glrm.args |
A list or arguments to be passed to |
seed |
Random number generator seed. |
... |
Other arguments to be passed down - currently unimplemented. |
This function initializes a static latent variable for each observation
on a given number of dimensions. This can use a principal components
analysis (PCA) model or a generalized low-rank model (GLRM). The latter
requires you to have the h2o
package installed.
A list with the reduced set of votes, their corresponding terms and an n x k matrix of latent variable estimates.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.