Evaluates predictions by a score suitable for the corresponding response
Scoring(lp, Y, model = NULL, score = ifelse(model == "linear", "mse", "loglik"),
print = TRUE)Numerical vector. Linear predictor.
Response vector: numeric, binary, factor or survival.
Character. See Details.
Character. Any of c("linear", "logistic", "cox"). Is inferred from
Y when NULL.
Boolean. Should the score be printed on screen.
Numerical value.
Several scores are allowed, depending on the type of output. For model = "linear",
score equals any of c("loglik","mse","abserror","cor","kendall","spearman"), denoting
CV-ed log-likelihood, mean-squared error, mean absolute error, Pearson (Kendall, Spearman) correlation with response.
For model = "logistic", score equals any of c("loglik","auc", "brier"), denoting
CV-ed log-likelihood, area-under-the-ROC-curve, and brier score a.k.a. MSE.
For model = "cox", score equals any of c("loglik","cindex"), denoting
CV-ed log-likelihood, and c-index.
CVscore for obtaining the cross-validated score (for given penalties), and doubleCV to obtain doubly cross-validated linear predictors to which Scoring can be applied to estimated predictive performance by double cross-validation. A full demo and data are available from:
https://drive.google.com/open?id=1NUfeOtN8-KZ8A2HZzveG506nBwgW64e4