Library / SDK
rasbt/mlxtend avatar
rasbt/mlxtend

mlxtend ships four uv install paths and a version that trails master

A library of extension and helper modules for Python's data analysis and machine learning libraries.

5,193 stars948 forksPythonNOASSERTION

At a glance

What is it?
The Python extension library documents uv add, a one-off uv run and two git based installs, puts its version inside the package instead of pyproject.toml, and asks for Python 3.11 or newer.
Who is it for?
mlxtend fits readers who already work with scikit-learn and want stacking, voting, feature selection and decision region plots without writing the glue themselves. Verify two things before you depend on it: the interpreter is 3.11 or newer with numpy 2.3.5 and pandas 2.3.3 or newer behind it, and the install path matches your tooling, since every documented path assumes uv.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • rasbt/mlxtend5,193 ★ · +18
Star history
Repository2026-09-112026-11-15
rasbt/mlxtend5.2k5.2k

18 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Four documented install paths, and every one of them runs through uv

Adding mlxtend to a uv-managed project takes a single command:

bash
uv add mlxtend

A one-off run that leaves your project files untouched is spelled out as well:

bash
uv run --with mlxtend python -c "import mlxtend; print(mlxtend.__version__)"

Two further paths reach past the package index. One installs straight from the repository with `uv add "mlxtend @ git+https://github.com/rasbt/mlxtend.git"`, the other forks the project and works from a local checkout:

bash
git clone https://github.com/<your_username>/mlxtend.git
cd mlxtend
uv sync --group dev
uv run python -c "import mlxtend; print(mlxtend.__version__)"

The local-checkout path, like the one-off run, ends by printing `mlxtend.__version__` instead of naming a release, which tells you at once which version you actually got. What is missing matters just as much: no pip line, no conda recipe, no wheel to fetch by hand, even though pip is the tool many readers reach for first.

The dev path calls a dependency group that duplicates two others

`uv sync --group dev` resolves against the `dev` group in pyproject.toml, which holds black, build, coverage, flake8, isort, pre-commit, pytest and twine. Every one of those is a maintainer tool. The six packages the library imports at run time, scipy, numpy, pandas, scikit-learn, matplotlib and joblib, sit in a separate `dependencies` list with no group name at all. The documentation toolchain is then declared twice: once as the `docs` extra under `[project.optional-dependencies]` with mkdocs, python-markdown-math, mkdocs-bootswatch, nbconvert, markdown and pyyaml, and again as a `docs` dependency group carrying the same six names in a different order. Two declarations of one toolchain, and nothing in the file says which one builds the published site at rasbt.github.io/mlxtend. A `testing` extra adds coverage and pytest on top of both.

The version number lives in the package source, not in pyproject.toml

pyproject.toml declares no version at all. It marks the field dynamic and hands setuptools an attribute to read:

toml
[tool.setuptools.dynamic]
version = {attr = "mlxtend.__version__"}

The line carrying the release number therefore sits inside the package itself, which suits a project whose README is signed Sebastian Raschka 2014-2026, and it explains why the install commands print `mlxtend.__version__` instead of asking you to trust a tag. The machinery around it is plain. `[build-system]` requires `setuptools >= 59.0.0` with the `setuptools.build_meta` backend, and `[tool.setuptools]` sets `platforms = ["any"]`, a statement that the distribution is not built for one operating system. Anyone who forks the repository has to keep that in mind, since a fork nobody re-tagged reports whatever its own source file says.

requirements.txt is a second copy of the dependency list

A root requirements.txt lists the same six entries as the `dependencies` block: scipy>=1.16.3, numpy>=2.3.5, pandas>=2.3.3, scikit-learn>=1.8.0, matplotlib>=3.10.8 and joblib>=1.5.2. Nothing in that file is exclusive to a checkout or a test run; the build requirement setuptools >= 59.0.0, the testing extra and the docs extra are all absent from it. Two copies of one list means every version bump has to be made twice or the two quietly drift apart. The floors are the part to read before you install: numpy 2.3.5, pandas 2.3.3, scipy 1.16.3 and scikit-learn 1.8.0 are all recent, so an older scientific stack already sitting in your environment is what will stop a resolve first.

Python 3.11 is the floor and the only version in the classifiers

The floor comes from `requires-python = ">=3.11"` in pyproject.toml, while the classifier block names `Programming Language :: Python :: 3.11` as the only interpreter it declares. The platform rows are broader by comparison, since Windows, POSIX, Unix and MacOS are each listed, along with topic rows for artificial intelligence, information analysis and image recognition. So the metadata is specific about operating systems and quiet about everything above 3.11, which matters if you pick packages by classifier rather than by version specifier, since a 3.12 interpreter satisfies the floor without appearing in the metadata. The testing pair, pytest and coverage, is offered as an extra and never as a hard requirement.

The newest tag is v0.25.0 and master has moved past it

The three most recent releases are v0.23.4 published 2025-01-26, v0.24.0 published 2025-12-13 and v0.25.0 published 2026-06-06. The default branch is master and its last push is dated 2026-10-30, more than four months after that newest tag, so the tree at the repository contains work no release has picked up yet. That gap is exactly what the README points at when it says the version on PyPI may always be one step behind, and it is the reason the git based install path exists. The intervals are uneven on their own: eleven months between v0.23.4 and v0.24.0, then roughly six. A Changelog is linked at rasbt.github.io/mlxtend/CHANGELOG, which is where to sort out which changes belong to which release.

The one example ends mid-line at the vote classifier

The Examples block imports numpy, matplotlib, matplotlib.gridspec and itertools, then three scikit-learn estimators: LogisticRegression, RandomForestClassifier and SVC. From mlxtend it pulls `EnsembleVoteClassifier` out of `mlxtend.classifier`, `iris_data` out of `mlxtend.data` and `plot_decision_regions` out of `mlxtend.plotting`. Every estimator is built with `random_state=0`, and the SVC additionally gets `probability=True`. The block then stops partway through the line that assembles them, at `eclf = EnsembleVoteClassifier(clfs=[clf1, clf2, cl`. No voting weights, no `fit` call and no plotting call appear after it, so what the example shows is the import surface and the constructor setup rather than a finished run.

Two license files, one unresolved metadata field

The license field in this repository's own metadata reads NOASSERTION, while the root of the tree carries LICENSE-BSD3.txt and LICENSE-CC-BY.txt and pyproject.toml declares `license = {text = "BSD 3-Clause"}` beside a BSD license classifier. The two files cover different things and the README draws the line itself. Code ships under a permissive BSD license, described as commercially usable and carrying no warranty, not even of merchantability or fitness for a particular purpose. The figures and images included in the distribution ship under Creative Commons Attribution 4.0, with one carve-out: plots produced by matplotlib count as computer-generated graphics and stay under the BSD license. Screens that only read metadata will not resolve that split, so read both files before reusing artwork.

Editorial conclusion

mlxtend fits readers who already work with scikit-learn and want stacking, voting, feature selection and decision region plots without writing the glue themselves. Verify two things before you depend on it: the interpreter is 3.11 or newer with numpy 2.3.5 and pandas 2.3.3 or newer behind it, and the install path matches your tooling, since every documented path assumes uv. Pin a version deliberately, because the newest tag trails the default branch by more than three months. For code the BSD terms are clear; for figures and images, read LICENSE-CC-BY.txt separately, and treat the repository's own NOASSERTION license field as unresolved.

Frequently asked questions

How do I install mlxtend in Python?

For a uv-managed project the README gives `uv add mlxtend`. For a one-off run that leaves your project alone it gives `uv run --with mlxtend python -c "import mlxtend; print(mlxtend.__version__)"`. No pip or conda line is provided.

Why is there no module named 'mlxtend' in Python?

mlxtend is a separate distribution, not part of the standard library, so it has to be installed before it can be imported. Two entries in pyproject.toml bear on the failure: the interpreter floor is 3.11, and six runtime dependencies with recent lower bounds, among them numpy>=2.3.5 and pandas>=2.3.3, have to resolve first.

How do I import plot_decision_regions from mlxtend plotting?

The Examples block imports it as `from mlxtend.plotting import plot_decision_regions`, next to `iris_data` from `mlxtend.data` and `EnsembleVoteClassifier` from `mlxtend.classifier`. Decision regions are one of the visualization utilities the library is built for.

Is mlxtend the same thing as scikit-learn?

No. scikit-learn is a runtime dependency at scikit-learn>=1.8.0, and the example constructs LogisticRegression, RandomForestClassifier and SVC from sklearn before handing them to mlxtend's `EnsembleVoteClassifier`. mlxtend layers ensemble, feature and plotting helpers on top rather than replacing the estimators.

Official sources

  1. Issues
  2. Project website
  3. rasbt/mlxtend on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/rasbt-mlxtend.svg)](https://hysenlabs.com/projects/rasbt-mlxtend)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/rasbt-mlxtend.svg)](https://hysenlabs.com/projects/rasbt-mlxtend)

Was this useful?