Description Usage Arguments Details Author(s) See Also Examples
Takes a rlda
object produced by rlda.binomial
and produces a prediction from it.
1 2 |
object |
a |
data |
Dataset used to make the predictions. Must have the same number of columns as the dataset used in the |
nclus |
Number of clusters to be used in the prediction. The default value is |
burnin |
a percentual of burn-in observations must be a number between 0 and 1. The default value is |
places.round |
Number decimal places tob rounded. The default value is |
... |
other arguments may be useful. |
Predicts the Gibbs Samping results and arguments.
Pedro Albuquerque.
pedroa@unb.br
http://pedrounb.blogspot.com/
Denis Valle.
drvalle@ufl.edu
http://denisvalle.weebly.com/
Daijiang Li.
daijianglee@gmail.com
rlda.binomial
, rlda.bernoulli
,rlda.multinomial
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## Not run:
library(Rlda)
# Read the SP500 data
data(sp500)
# Create size
spSize <- as.data.frame(matrix(100,
ncol = ncol(sp500),
nrow = nrow(sp500)))
# Set seed
set.seed(5874)
# Hyperparameters for each prior distribution
gamma <- 0.01
alpha0 <- 0.01
alpha1 <- 0.01
# Execute the LDA for the Binomial entry
res <- rlda.binomial(data = sp500, pop = spSize, n_community = 10,
alpha0 = alpha0, alpha1 = alpha1, gamma = gamma,
n_gibbs = 500, ll_prior = TRUE, display_progress = TRUE)
#Predict
pred<- predict(res, sp500, nclus=3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.