av_out: Averaging out the predictive power

Description Usage Arguments Value Examples

View source: R/carrot_functions.R

Description

Function which averages out the predictive power over all cross-validations

Usage

1
av_out(preds,crv,k)

Arguments

preds

An M x crvN matrix consisting of crv horizontally concatenated M x N matrices. These M x N matrices are the matrices of predictive powers for all feasible regressions (M is maximum feasible number of variables included in a regression, N is the maximum feasible number of regressions of the fixed size; the row index indicates the number of variables included in a regression)

crv

number of cross-validations

k

size of the test set for which the predictions are made

Value

Returns an M x N matrix of average predictive powers where M is maximum feasible number of variables included in a regression, N is the maximum feasible number of regressions of the fixed size; the row index indicates the number of variables included in a regression

Examples

1
2
3
4
5
6
7
8
#creating a matrix of predictive powers

preds<-cbind(matrix(runif(40,1,4),ncol=10),matrix(runif(40,1.5,4),ncol=10))
preds<-cbind(preds,matrix(runif(40,1,3.5),ncol=10))

#running the function

av_out(preds,3,5)

CARRoT documentation built on June 8, 2021, 5:09 p.m.

Related to av_out in CARRoT...