Feature selection with the R package MXM

Michail Tsagris, Ioannis Tsamardinos

Abstract

Feature selection is the process of identifying the minimal set of features with the highest predictive performance on a target variable. While numerous algorithms exist, few are implemented in R with the flexibility to handle diverse data types or high-volume datasets. The R package MXM (Mens eX Machina) addresses these gaps by offering a unified framework for various target variables (continuous, survival, count, etc.), memory-efficient processing for massive datasets, and the unique ability to identify multiple statistically equivalent feature sets. This paper compares MXM with existing tools and demonstrates its utility across high-dimensional biological and clinical datasets.

Introduction

In modern data science, the "curse of dimensionality"—where features vastly outnumber samples—poses a significant challenge. Feature selection aims to mitigate this by isolating the most informative variables. However, the R ecosystem for feature selection has historically been fragmented. Most packages are specialized for binary or continuous outcomes, leaving researchers working with survival, longitudinal, or count data with few robust options. Furthermore, standard algorithms typically return a single "best" feature set, ignoring the reality of "equivalent signatures" where multiple distinct sets of variables may provide identical predictive power.

The MXM Framework

MXM implements a suite of algorithms inspired by Bayesian network learning, designed to handle the complexities of modern research data through a "plug-and-play" architecture.

Core Algorithms

  • MMPC (Max-Min Parents and Children): Optimized for small sample sizes, identifying the local neighborhood of a target variable.
  • SES (Statistically Equivalent Signatures): A hallmark of the package, SES identifies multiple sets of features that are statistically interchangeable. This is vital in fields like genomics for identifying alternative biomarkers.
  • FBED (Forward-Backward with Early Dropping): A high-speed algorithm for high-volume data that utilizes an early dropping mechanism to prune irrelevant features efficiently.
  • gOMP (generalized Orthogonal Matching Pursuit): A residual-based approach capable of scaling to hundreds of thousands of features.

Architectural Advantages

MXM allows users to swap underlying regression models (e.g., Cox, Weibull, Poisson, or Logistic) based on their specific target variable. Additionally, by integrating with the bigmemory package, MXM can perform feature selection on datasets that exceed physical RAM—a common bottleneck for R users working with large-scale omics data.

Applications and Performance

The authors demonstrated MXM’s flexibility using five distinct high-dimensional real-world datasets, including breast cancer survival data, gene expressions with binary targets, and RNA-seq count data.

Versatility and Scale

A survey of 184 R packages revealed that MXM is uniquely comprehensive, supporting eight distinct target variable types. While 58% of existing packages handle binary data, fewer than 2% support ordinal or case-control data—areas where MXM provides robust support. In performance benchmarks, the gOMP algorithm demonstrated efficiency comparable to or exceeding the popular glmnet (LASSO) implementation for specific high-dimensional tasks.

Identifying Equivalent Solutions

In a longitudinal study of skeletal muscle (GSE9105), MXM’s SES algorithm identified that a primary feature (Var 2683) had nine statistically equivalent counterparts. Standard forward-selection models would have missed these relationships, potentially overlooking critical biological insights and interchangeable biomarkers.

Discussion and Limitations

While MXM offers a powerful "Swiss Army knife" for feature selection, certain limitations remain. The package currently lacks support for time-series data, and the highly efficient gOMP algorithm is currently restricted to continuous predictor variables. Some complex models, such as ordinal regression, remain computationally intensive due to reliance on external R implementations. Future development aims to port more core logic to C++ to further enhance performance and to integrate graphical visualization tools for feature networks.

Conclusion

The MXM package provides a robust, scalable, and versatile solution for feature selection in R. By supporting a wide array of data types and identifying equivalent feature sets, it offers researchers a more holistic and efficient toolset for high-dimensional data analysis.

Summary updated

BibTeX
@inproceedings{tsagris2019feature,
  author = {Michail Tsagris and Ioannis Tsamardinos},
  title = {{Feature selection with the R package MXM}},
  booktitle = {F1000Research},
  year = {2019},
  doi = {10.12688/f1000research.16216.2},
}
Figure