Data Mining Algorithms In R/Packages/gausspred/data gau

Description

edit

Data generation and processing.

Usage

edit

gen_bayesgau (n,p,G,tau_nu=1,tau_mu=1,p_tau_x=c(2,1)).

order_features (features, response).

Arguments

edit

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 ν.

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

edit

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.

Example

edit

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)