cv.cornet {cornet} | R Documentation |
Performance measurement
Description
Compares models for a continuous response with a cut-off value.
Usage
cv.cornet(
y,
cutoff,
X,
alpha = 1,
nfolds.ext = 5,
nfolds.int = 10,
foldid.ext = NULL,
foldid.int = NULL,
type.measure = "deviance",
rf = FALSE,
xgboost = FALSE,
...
)
Arguments
y |
continuous outcome:
vector of length |
cutoff |
cut-off point for dichotomising outcome into classes:
meaningful value between |
X |
features:
numeric matrix with |
alpha |
elastic net mixing parameter:
numeric between |
nfolds.ext |
number of external folds |
nfolds.int |
internal fold identifiers:
vector of length |
foldid.ext |
external fold identifiers:
vector of length |
foldid.int |
number of internal folds |
type.measure |
loss function for binary classification:
character |
rf |
comparison with random forest: logical |
xgboost |
comparison with extreme gradient boosting: logical |
... |
Details
Computes the cross-validated loss of logistic and combined regression.
Examples
## Not run: n <- 100; p <- 200
y <- rnorm(n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
start <- Sys.time()
loss <- cv.cornet(y=y,cutoff=0,X=X)
end <- Sys.time()
end - start
loss
## End(Not run)