Description Usage Arguments Details Value Examples
ARD
returns the estimated coefficients, estimated hyper-parameters, number of iterations and likelihood scores by Automated Relevance Determination (ARD).
1 2 3 4 5 |
X |
predictor matrix of dimension n*q. |
Y |
continuous outcome vector of dimension p. |
sigma.square |
variance of noise, used for method 'Reweighted l1'. Default value is estimated by |
sigma.square.init |
variance of noise, used for method 'FixedPoint' and 'EM'. Default value is |
gamma.init |
initial value for hyper parameter, only for method 'Reweighted l1' |
eta.init |
initial value for hyper parameter, only for method 'EM' and 'FixedPoint' |
threshold_eta |
cut off point for very large eta |
maxstep |
max number of iterations |
margin |
iteration stoping creteria |
verbosity |
print current iteraction number |
compute.likelihood |
whether compute likelihood in each step |
ARD based on three optimization algorithms – EM algorithm, Fixed Point update rule and Reweighted-l1 algorithm. If use method 'reweighted-l1', please provide sigma.square otherwise an external function was called to estimate sigma square if you have prefered initial value for gamma, set gamma.init, otherwise gamma.init was initialized to be rep(1,ncol(X)) If use method: EM or Fixed Point update,sigma.square.init was used,the default initial value is variance of Y,if you have prefered initial value for eta, set eta.init, otherwise eta.init was initialized to be rep(1,ncol(X))
returns the estimated coefficients, estimated hyper-parameters, number of iterations and likelihood scores by Automated Relevance Determination (ARD).
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(99)
n = 100
p = 200
x <- matrix(rnorm(2*n*p,0,1),nrow=2*n,ncol=p)
betas=rnorm(n = p, s = 1/exp(z_design%*%alpha))
y <- x%*%betas + rnorm(2*n,0,1)
x_train = x[1:n,]
y_train = y[1:n]
x_test = x[(n+1):(2*n),]
y_test = y[(n+1):(2*n)]
ARD.fit = ARD(x_train,y_train)
1-get_mse(x_test%*%ARD_fit$coef,y_test)/var(y_test)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.