mlpack /mlpack

mlpack: a fast, header-only C++ machine learning library

★ 5,727⑂ 1,733👁 180⑃ 2,548● 1,714▤ 54
C++NOASSERTIONCreated 2014-12-17www.mlpack.org/
Download: mlpack 4.8.0mlpack-4.8.0 ↓4.8.02026-06-09
+0
Daily
5,727
stars
1,733
forks
180
watchers
2,548
prs
1,714
issues
54
releases

README

a fast, header-only machine learning library



  Home |
  Download |
  Documentation |
  Help



  
  
  



  
    Download:
    current stable version (4.8.0)
  


mlpack is an intuitive, fast, and flexible header-only C++ machine learning
library with bindings to other languages.  It is meant to be a machine learning
analog to LAPACK, and aims to implement a wide array of machine learning methods
and functions as a "swiss army knife" for machine learning researchers.

mlpack's lightweight C++ implementation makes it ideal for deployment and
production environments; but it can also be used for interactive prototyping via
C++ notebooks.

In addition to its powerful C++ interface, mlpack also provides command-line
programs, Python bindings, Julia bindings, Go bindings and R bindings.

Quick links:

 - Quickstart guides: C++,
   CLI, Python,
   R, Julia,
   Go
 - mlpack homepage
 - mlpack documentation
 - Examples repository
 - Tutorials
 - Development Site (Github)

[//]:  (numfocus-fiscal-sponsor-attribution)

mlpack uses an open governance model and is fiscally
sponsored by NumFOCUS.  Consider making a
tax-deductible donation to help the
project pay for developer time, professional services, travel, workshops, and a
variety of other needs.


  
    
  



 0. Contents

 1. Citation details
 2. Dependencies
 3. Installation
 4. Usage from C++
     1. Reducing compile time
 5. Building mlpack's test suite
 6. Further resources

 1. Citation details

If you use mlpack in your research or software, please cite mlpack using the
citation below (given in BibTeX format):

    @article{mlpack2023,
        title     = {mlpack 4: a fast, header-only C++ machine learning library},
        author    = {Ryan R. Curtin and Marcus Edel and Omar Shrit and 
                     Shubham Agrawal and Suryoday Basak and James J. Balamuta and 
                     Ryan Birmingham and Kartik Dutt and Dirk Eddelbuettel and 
                     Rishabh Garg and Shikhar Jaiswal and Aakash Kaushik and 
                     Sangyeon Kim and Anjishnu Mukherjee and Nanubala Gnana Sai and 
                     Nippun Sharma and Yashwant Singh Parihar and Roshan Swain and 
                     Conrad Sanderson},
        journal   = {Journal of Open Source Software},
        volume    = {8},
        number    = {82},
        pages     = {5026},
        year      = {2023},
        doi       = {10.21105/joss.05026},
        url       = {https://doi.org/10.21105/joss.05026}
    }

Citations are beneficial for the growth and improvement of mlpack.

 2. Dependencies

mlpack requires the following additional dependencies:

 - C++17 compiler
 - Armadillo        = 10.8
 - ensmallen       = 2.10.0
 - cereal             = 1.1.2

mlpack bundles the STB,
httplib, and
dr_libs header-only libraries to
provide image loading support, dataset download, and audio loading support,
respectively. If you prefer to use versions available on your system, see
the co

Top issues

Discussions

Latest release

mlpack 4.8.0 4.8.0 2026-06-09
Released June 9th, 2026.

  Add Mel Filterbanks Energies (MFE) and Mel-frequency cepstral coefficients (MFCC) as part of our signal processing utilities (4144).

  Add support for audio data via dr_wav and dr_mp3 allowing to load these file types (4112, 4113).

  Add HTTP support via cpp-httplib to allow online dataset downloading (4092, 4099).

  Fix header inclusion and warnings in R package (4098).

  Adapt TransposedConvolution ANN layer to the new interface (3967).

  Fix rendering of Python documentation (4126).

  Add TSVASCII format for loading TSVs (4127).

  Efficienc

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON