Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

OHPL.RMSEP

Compute RMSEP, MAE, and Q2 for a Test Set


Description

This function makes predictions on new data and computes the performance evaluation metrics RMSEP, MAE, and Q2.

Usage

OHPL.RMSEP(object, newx, newy)

Arguments

object

An An object of class OHPL fitted by OHPL.

newx

Predictor matrix of the new data.

newy

Response matrix of the new data (matrix with one column).

Value

A list of the performance metrics.

Examples

# generate simulation data
dat <- OHPL.sim(
  n = 100, p = 100, rho = 0.8,
  coef = rep(1, 10), snr = 3, p.train = 0.5,
  seed = 1010
)

# split training and test set
x <- dat$x.tr
y <- dat$y.tr
x.test <- dat$x.te
y.test <- dat$y.te

# fit the OHPL model
fit <- OHPL(x, y, maxcomp = 3, gamma = 0.5, G = 10, type = "max")

# compute evaluation metric RMSEP, Q2 and MAE for the test set
perf <- OHPL.RMSEP(fit, x.test, y.test)
perf$RMSEP
perf$Q2
perf$MAE

OHPL

Ordered Homogeneity Pursuit Lasso for Group Variable Selection

v1.4
GPL-3 | file LICENSE
Authors
You-Wu Lin [aut], Nan Xiao [cre] (<https://orcid.org/0000-0002-0250-5673>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.