data_gau {gausspred}R Documentation

Data generation and processing

Description

gendata_bayesgau generates data from a Bayesian Gaussian classification model. Model specification please refer to the paper.

order_features orders features by the F-statistic.

Usage

gen_bayesgau (n,p,G,tau_nu=1,tau_mu=1,p_tau_x=c(2,1) )
order_features (features, response)

Arguments

n the number of cases.
p the number of features.
G the number of groups.
tau_nu the inverse of variance of Gaussian distribution for generating nu.
tau_mu the inverse of variance of Gaussian distribution for generating μ.
p_tau_x a vector of 2 numbers, specifying the Gamma distribution as prior for the inverse of the variance for the distribution of features, the first number is shape, the second is rate.
features the features, with the rows for the cases.
response the response values.

Value

The function gendata_bayesgau returns the following items:

X the features, with the row standing for the cases.
y the response values.
mu the values of mu, with columns for groups.
sigmas the variance generating features.
nu the value of nu for features.
vars the indice of features, in decreasing order of F-statistic.
fstats the values of F-statistic for features indexed by vars.

Examples


# generate data for Gaussian classification models

data <- gen_bayesgau (n = 100,p = 100,G = 2,
        tau_nu=100,tau_mu = 100, p_tau_x = c(4,1))
i_sel <- order_features (data$X, data$y)

[Package gausspred version 1.0-0 Index]