# NOT RUN {
##Load the sample of Wikipedia biography data
data(BioSample)
# Divide into training and test sets
Y <- BioSample[,1]
X <- BioSample[,-1]
set.seed(1)
train.ind <- sample(1:nrow(X), size = 0.5*nrow(X), replace = FALSE)
# Search sIBP for several parameter configurations; fit each to the training set
sibp.search <- sibp_param_search(X, Y, K = 2, alphas = c(2,4),
sigmasq.ns = c(0.8, 1), iters = 1,
train.ind = train.ind)
# }
# NOT RUN {
# Get metric for evaluating most promising parameter configurations
sibp_rank_runs(sibp.search, X, 10)
# Qualitatively look at the top candidates
sibp_top_words(sibp.search[["4"]][["0.8"]][[1]], colnames(X), 10, verbose = TRUE)
sibp_top_words(sibp.search[["4"]][["1"]][[1]], colnames(X), 10, verbose = TRUE)
# }
Run the code above in your browser using DataLab