Getting started with highMLR

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Overview

highMLR provides a single, unified interface for high-dimensional feature selection when the outcome is a (possibly censored) survival time. The same highmlr() call dispatches to one of several machine learning methods:

All methods return a highmlr_fit object with a common structure, so the downstream verbs (print(), summary(), plot(), coef(), predict()) and the companion functions (highmlr_compare(), highmlr_stability(), highmlr_explain(), highmlr_screen(), highmlr_report()) work identically regardless of which method produced the fit.

A first fit

The package ships with two bundled high-dimensional survival datasets, hnscc and srdata. Both use OS for the survival time; the event indicator is Death in hnscc and event in srdata (1 = event, 0 = censored).

library(highMLR)
data(hnscc)

fit <- highmlr(
  hnscc,
  time   = "OS",
  status = "Death",
  method = "coxnet",
  resampling = "cv",
  folds = 5
)

print(fit)
plot(fit, top_n = 20)

The examples in this vignette are not evaluated at build time because the underlying learners (glmnet, ranger, aorsf, xgboost, grf, survex) can be slow on high-dimensional data. Copy the chunks into an interactive session to run them.

Comparing methods

highmlr_compare() runs several methods on the same data and returns a tidy side-by-side summary:

cmp <- highmlr_compare(
  hnscc, "OS", "Death",
  methods = c("coxnet", "rsf", "univariate")
)
cmp$summary

Pre-screening when p is very large

For very wide data, reduce the candidate set first:

data(srdata)
keep <- highmlr_screen(srdata, "OS", "event",
                       filter = "variance", keep = 500)
fit  <- highmlr(srdata, "OS", "event",
                features = keep, method = "coxnet")

Explaining a fit

Time-dependent SHAP values (SurvSHAP(t)) are available via highmlr_explain(), and a one-file biomarker report can be generated with highmlr_report().

ex <- highmlr_explain(fit, new_data = hnscc, method = "survshap")
print(ex)
plot(ex)

Session information

sessionInfo()


Try the highMLR package in your browser

Any scripts or data that you put into this service are public.

highMLR documentation built on May 23, 2026, 5:07 p.m.