Selective Bayesian Forest Classifier (SBFC) algorithm
Description
Runs the SBFC algorithm on a discretized data set. To discretize your data, use the data_disc
command.
Usage
1 2 
Arguments
data 
Discretized data set:

nstep 
Number of MCMC steps, default max(10000, 10 * ncol(TrainX)). 
thin 
Thinning factor for the MCMC. 
burnin_denom 
Denominator of the fraction of total MCMC steps discarded as burnin (default=5). 
cv 
Do crossvalidation on the training set (if test set is not provided). 
thinoutputs 
Return thinned MCMC outputs (parents, groups, trees, logposterior), rather than all outputs (default=FALSE). 
Details
Data needs to be discretized before running SBFC.
If the test data matrix TestX is provided, SBFC runs on the entire training set TrainX, and provides predicted class labels for the test data.
If the test data class vector TestY is provided, the accuracy is computed.
If the test data matrix TestX is not provided, and cv is set to TRUE, SBFC performs crossvalidation on the training data set TrainX,
and returns predicted classes and accuracy for the training data.
Value
An object of class sbfc
:
accuracy
Classification accuracy (on the test set if provided, otherwise crossvalidation accuracy on training set).
predictions
Vector of class label predictions (for the test set if provided, otherwise for the training set).
probabilities
Matrix of class label probabilities (for the test set if provided, otherwise for the training set).
runtime
Total runtime of the algorithm in seconds.
parents
Matrix representing the structures sampled by MCMC, where parents[i,j] is the index of the parent of node j at iteration i (0 if node is a root).
groups
Matrix representing the structures sampled by MCMC, where groups[i,j] indicates which group node j belongs to at iteration j (0 is noise, 1 is signal).
trees
Matrix representing the structures sampled by MCMC, where trees[i,j] indicates which tree node j belongs to at iteration j.
logposterior
Vector representing the log posterior at each iteration of the MCMC.
 Parameters
nstep
,thin
,burnin_denom
,cv
,thinoutputs
.
If cv=TRUE
, the MCMC samples from the first fold are returned (parents
, groups
, trees
, logposterior
).
Examples
1 2 3 4 