gendata.bayes {predbayescor} | R Documentation |
Generate binary data with Bayesian naive Bayes Models
Description
"gendata.bayes" generates data (both training and test data) with
Bayesian naive Bayes model. The prior distribution of "theta" is uniform(0,1). The value of "alpha" is given by argument alpha, which controls the the overall relationship between the response and the predictor variables.
Usage
gendata.bayes(n0,n1,m0,m1,p,alpha)
Arguments
n0 |
the number of class 0 in training data |
n1 |
the number of class 1 in training data |
m0 |
the number of class 0 in test data |
m1 |
the number of class 1 in test data |
p |
the number of features |
alpha |
a parameter controlling the dependency between the features and the
response |
Value
train |
the training data, with the row standing for the cases and the
first column being the response |
test |
the test data, of the same format as "train" |
See Also
predict_bayes
[Package
predbayescor version 1.1-4
Index]