efcp_ridge {ConformalSmallest}R Documentation

Efficiency first conformal prediction for ridge regression

Description

Efficiency first conformal prediction for ridge regression

Usage

efcp_ridge(X, Y, X0, lambda = seq(0, 100, length = 100), alpha = 0.1)

Arguments

X

A N*d training matrix

Y

A N*1 training vector

X0

A N0*d testing vector

lambda

a sequence of penalty parameters for ridge regression

alpha

miscoverage level

Value

upper and lower prediction intervals for X0.

Examples

df=3
d = 5
n=50   #number of training samples
n0=10  #number of prediction points
rho=0.5
Sigma=matrix(rho,d,d)
diag(Sigma)=rep(1,d)
beta=rep(1:5,d/5)
X0=mvtnorm::rmvt(n0,Sigma,df)
X=mvtnorm::rmvt(n,Sigma,df)	#multivariate t distribution
eps=rt(n,df)*(1+sqrt(X[,1]^2+X[,2]^2))
Y=X%*%beta+eps
out.efcp=efcp.fun(X,Y,X0)
out.efcp$up
out.efcp$lo

[Package ConformalSmallest version 1.0 Index]