mlpack /mlpack
mlpack: a fast, header-only C++ machine learning library
★ 5,727⑂ 1,733👁 180⑃ 2,548● 1,714▤ 54
+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 coTop issues
#290support arbitrary-precision types8 comments · 2014-12-29#3966String identifier for each layer in the network7 comments · 2025-07-07#4250Proposal: add SEFR, a fast hyperparameter-free linear classifier3 comments · 2026-10-01#4245Add TreeInterpreter-style feature contributions for RandomForest2 comments · 2026-09-23#3656Move the Wiki developer section to the new docs developer page2 comments · 2024-03-14#4256Categorical CSV loading treats headers as data1 comments · 2026-10-15#4200Adding gzip support to load functionality when downloading1 comments · 2026-06-27#3620Refactor mlpack header to be similar to ensmallen.1 comments · 2024-02-13
Discussions
#3894Does MLPack have a module that does optimal tree classification?1 comments · 2025-02-16#3883Guidance for a New Contributor1 comments · 2025-01-19#3874Is there an example to get vcpkg working with clang-cl.exe for purposes of mlpack usage?1 comments · 2025-01-10#3816Windows MSI installer link down1 comments · 2024-10-22#3698Using google/highway for vectorization instead of depending on the compiler autovectorization2 comments · 2024-04-28#3618Types OutputLayerType1 comments · 2024-02-12
Latest release
mlpack 4.8.0 4.8.0 2026-06-09Released 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