predict {Rlda} | R Documentation |
Takes a rlda
object produced by rlda.binomial
and produces a prediction from it.
## S3 method for class 'rlda' predict(object, data, nclus=NA, burnin=0.1, places.round=0, ...)
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
## 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)