mlxtend


Namemlxtend JSON
Version 0.23.1 PyPI version JSON
download
home_page
SummaryMachine Learning Library Extensions
upload_time2024-01-05 09:13:52
maintainer
docs_urlhttps://pythonhosted.org/mlxtend/
author
requires_python
licenseBSD 3-Clause
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](https://joss.theoj.org/papers/10.21105/joss.00638/status.svg)](https://doi.org/10.21105/joss.00638)
[![PyPI version](https://badge.fury.io/py/mlxtend.svg)](https://badge.fury.io/py/mlxtend)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mlxtend/badges/version.svg)](https://anaconda.org/conda-forge/mlxtend)
[![Build status](https://ci.appveyor.com/api/projects/status/7vx20e0h5dxcyla2/branch/master?svg=true)](https://ci.appveyor.com/project/rasbt/mlxtend/branch/master)
[![codecov](https://codecov.io/gh/rasbt/mlxtend/branch/master/graph/badge.svg)](https://codecov.io/gh/rasbt/mlxtend)
![Python 3](https://img.shields.io/badge/python-3-blue.svg)
![License](https://img.shields.io/badge/license-BSD-blue.svg)
[![Discuss](https://img.shields.io/badge/discuss-github-blue.svg)](https://github.com/rasbt/mlxtend/discussions)

<img src="./docs/sources/img/logo.png" alt="mlxtend logo" width="300px">

**Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks.**

<br>

Sebastian Raschka 2014-2024

<br>

## Links

- **Documentation:** [https://rasbt.github.io/mlxtend](https://rasbt.github.io/mlxtend)
- PyPI: [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend)
- Changelog: [https://rasbt.github.io/mlxtend/CHANGELOG](https://rasbt.github.io/mlxtend/CHANGELOG)
- Contributing: [https://rasbt.github.io/mlxtend/CONTRIBUTING](https://rasbt.github.io/mlxtend/CONTRIBUTING)
- Questions? Check out the [GitHub Discussions board](https://github.com/rasbt/mlxtend/discussions)

<br>
<br>

## Installing mlxtend

#### PyPI

To install mlxtend, just execute  

```bash
pip install mlxtend  
```

Alternatively, you could download the package manually from the Python Package Index [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend), unzip it, navigate into the package, and use the command:

```bash
python setup.py install
```

#### Conda
If you use conda, to install mlxtend just execute

```bash
conda install -c conda-forge mlxtend 
```

#### Dev Version

The mlxtend version on PyPI may always be one step behind; you can install the latest development version from the GitHub repository by executing

```bash
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
```

Or, you can fork the GitHub repository from https://github.com/rasbt/mlxtend and install mlxtend from your local drive via

```bash
python setup.py install
```

<br>
<br>

## Examples

```python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import itertools
from sklearn.linear_model import LogisticRegression
from sklearn.svm import SVC
from sklearn.ensemble import RandomForestClassifier
from mlxtend.classifier import EnsembleVoteClassifier
from mlxtend.data import iris_data
from mlxtend.plotting import plot_decision_regions

# Initializing Classifiers
clf1 = LogisticRegression(random_state=0)
clf2 = RandomForestClassifier(random_state=0)
clf3 = SVC(random_state=0, probability=True)
eclf = EnsembleVoteClassifier(clfs=[clf1, clf2, clf3], weights=[2, 1, 1], voting='soft')

# Loading some example data
X, y = iris_data()
X = X[:,[0, 2]]

# Plotting Decision Regions
gs = gridspec.GridSpec(2, 2)
fig = plt.figure(figsize=(10, 8))

for clf, lab, grd in zip([clf1, clf2, clf3, eclf],
                         ['Logistic Regression', 'Random Forest', 'RBF kernel SVM', 'Ensemble'],
                         itertools.product([0, 1], repeat=2)):
    clf.fit(X, y)
    ax = plt.subplot(gs[grd[0], grd[1]])
    fig = plot_decision_regions(X=X, y=y, clf=clf, legend=2)
    plt.title(lab)
plt.show()
```

![](./docs/sources/img/ensemble_decision_regions_2d.png)

---

If you use mlxtend as part of your workflow in a scientific publication, please consider citing the mlxtend repository with the following DOI:


```
@article{raschkas_2018_mlxtend,
  author       = {Sebastian Raschka},
  title        = {MLxtend: Providing machine learning and data science 
                  utilities and extensions to Python’s  
                  scientific computing stack},
  journal      = {The Journal of Open Source Software},
  volume       = {3},
  number       = {24},
  month        = apr,
  year         = 2018,
  publisher    = {The Open Journal},
  doi          = {10.21105/joss.00638},
  url          = {https://joss.theoj.org/papers/10.21105/joss.00638}
}
```

- Raschka, Sebastian (2018) MLxtend: Providing machine learning and data science utilities and extensions to Python's scientific computing stack.
J Open Source Softw 3(24).

---

## License

- This project is released under a permissive new BSD open source license ([LICENSE-BSD3.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-BSD3.txt)) and commercially usable. There is no warranty; not even for merchantability or fitness for a particular purpose.
- In addition, you may use, copy, modify and redistribute all artistic creative works (figures and images) included in this distribution under the directory
according to the terms and conditions of the Creative Commons Attribution 4.0 International License.  See the file [LICENSE-CC-BY.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-CC-BY.txt) for details. (Computer-generated graphics such as the plots produced by matplotlib fall under the BSD license mentioned above).

## Contact

The best way to ask questions is via the [GitHub Discussions channel](https://github.com/rasbt/mlxtend/discussions). In case you encounter usage bugs, please don't hesitate to use the [GitHub's issue tracker](https://github.com/rasbt/mlxtend/issues) directly. 

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "mlxtend",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/mlxtend/",
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Sebastian Raschka <mail@sebastianraschka.com>",
    "download_url": "https://files.pythonhosted.org/packages/df/2e/c5d81e019997909a8abe82992ae5c0db7ac138b6d12b13a579a0843d40bf/mlxtend-0.23.1.tar.gz",
    "platform": "any",
    "description": "[![DOI](https://joss.theoj.org/papers/10.21105/joss.00638/status.svg)](https://doi.org/10.21105/joss.00638)\n[![PyPI version](https://badge.fury.io/py/mlxtend.svg)](https://badge.fury.io/py/mlxtend)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mlxtend/badges/version.svg)](https://anaconda.org/conda-forge/mlxtend)\n[![Build status](https://ci.appveyor.com/api/projects/status/7vx20e0h5dxcyla2/branch/master?svg=true)](https://ci.appveyor.com/project/rasbt/mlxtend/branch/master)\n[![codecov](https://codecov.io/gh/rasbt/mlxtend/branch/master/graph/badge.svg)](https://codecov.io/gh/rasbt/mlxtend)\n![Python 3](https://img.shields.io/badge/python-3-blue.svg)\n![License](https://img.shields.io/badge/license-BSD-blue.svg)\n[![Discuss](https://img.shields.io/badge/discuss-github-blue.svg)](https://github.com/rasbt/mlxtend/discussions)\n\n<img src=\"./docs/sources/img/logo.png\" alt=\"mlxtend logo\" width=\"300px\">\n\n**Mlxtend (machine learning extensions) is a Python library of useful tools for the day-to-day data science tasks.**\n\n<br>\n\nSebastian Raschka 2014-2024\n\n<br>\n\n## Links\n\n- **Documentation:** [https://rasbt.github.io/mlxtend](https://rasbt.github.io/mlxtend)\n- PyPI: [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend)\n- Changelog: [https://rasbt.github.io/mlxtend/CHANGELOG](https://rasbt.github.io/mlxtend/CHANGELOG)\n- Contributing: [https://rasbt.github.io/mlxtend/CONTRIBUTING](https://rasbt.github.io/mlxtend/CONTRIBUTING)\n- Questions? Check out the [GitHub Discussions board](https://github.com/rasbt/mlxtend/discussions)\n\n<br>\n<br>\n\n## Installing mlxtend\n\n#### PyPI\n\nTo install mlxtend, just execute  \n\n```bash\npip install mlxtend  \n```\n\nAlternatively, you could download the package manually from the Python Package Index [https://pypi.python.org/pypi/mlxtend](https://pypi.python.org/pypi/mlxtend), unzip it, navigate into the package, and use the command:\n\n```bash\npython setup.py install\n```\n\n#### Conda\nIf you use conda, to install mlxtend just execute\n\n```bash\nconda install -c conda-forge mlxtend \n```\n\n#### Dev Version\n\nThe mlxtend version on PyPI may always be one step behind; you can install the latest development version from the GitHub repository by executing\n\n```bash\npip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend\n```\n\nOr, you can fork the GitHub repository from https://github.com/rasbt/mlxtend and install mlxtend from your local drive via\n\n```bash\npython setup.py install\n```\n\n<br>\n<br>\n\n## Examples\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nimport itertools\nfrom sklearn.linear_model import LogisticRegression\nfrom sklearn.svm import SVC\nfrom sklearn.ensemble import RandomForestClassifier\nfrom mlxtend.classifier import EnsembleVoteClassifier\nfrom mlxtend.data import iris_data\nfrom mlxtend.plotting import plot_decision_regions\n\n# Initializing Classifiers\nclf1 = LogisticRegression(random_state=0)\nclf2 = RandomForestClassifier(random_state=0)\nclf3 = SVC(random_state=0, probability=True)\neclf = EnsembleVoteClassifier(clfs=[clf1, clf2, clf3], weights=[2, 1, 1], voting='soft')\n\n# Loading some example data\nX, y = iris_data()\nX = X[:,[0, 2]]\n\n# Plotting Decision Regions\ngs = gridspec.GridSpec(2, 2)\nfig = plt.figure(figsize=(10, 8))\n\nfor clf, lab, grd in zip([clf1, clf2, clf3, eclf],\n                         ['Logistic Regression', 'Random Forest', 'RBF kernel SVM', 'Ensemble'],\n                         itertools.product([0, 1], repeat=2)):\n    clf.fit(X, y)\n    ax = plt.subplot(gs[grd[0], grd[1]])\n    fig = plot_decision_regions(X=X, y=y, clf=clf, legend=2)\n    plt.title(lab)\nplt.show()\n```\n\n![](./docs/sources/img/ensemble_decision_regions_2d.png)\n\n---\n\nIf you use mlxtend as part of your workflow in a scientific publication, please consider citing the mlxtend repository with the following DOI:\n\n\n```\n@article{raschkas_2018_mlxtend,\n  author       = {Sebastian Raschka},\n  title        = {MLxtend: Providing machine learning and data science \n                  utilities and extensions to Python\u2019s  \n                  scientific computing stack},\n  journal      = {The Journal of Open Source Software},\n  volume       = {3},\n  number       = {24},\n  month        = apr,\n  year         = 2018,\n  publisher    = {The Open Journal},\n  doi          = {10.21105/joss.00638},\n  url          = {https://joss.theoj.org/papers/10.21105/joss.00638}\n}\n```\n\n- Raschka, Sebastian (2018) MLxtend: Providing machine learning and data science utilities and extensions to Python's scientific computing stack.\nJ Open Source Softw 3(24).\n\n---\n\n## License\n\n- This project is released under a permissive new BSD open source license ([LICENSE-BSD3.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-BSD3.txt)) and commercially usable. There is no warranty; not even for merchantability or fitness for a particular purpose.\n- In addition, you may use, copy, modify and redistribute all artistic creative works (figures and images) included in this distribution under the directory\naccording to the terms and conditions of the Creative Commons Attribution 4.0 International License.  See the file [LICENSE-CC-BY.txt](https://github.com/rasbt/mlxtend/blob/master/LICENSE-CC-BY.txt) for details. (Computer-generated graphics such as the plots produced by matplotlib fall under the BSD license mentioned above).\n\n## Contact\n\nThe best way to ask questions is via the [GitHub Discussions channel](https://github.com/rasbt/mlxtend/discussions). In case you encounter usage bugs, please don't hesitate to use the [GitHub's issue tracker](https://github.com/rasbt/mlxtend/issues) directly. \n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause",
    "summary": "Machine Learning Library Extensions",
    "version": "0.23.1",
    "project_urls": {
        "Documentation": "https://rasbt.github.io/mlxtend",
        "Homepage": "https://github.com/rasbt/mlxtend",
        "Repository": "https://github.com/rasbt/mlxtend"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c07512f6a780239ad6ce06ce2aa7b4067583f5ddcfc7703a964a082c706a070",
                "md5": "f7c2d97ce4c4f1278b0edc9934c45668",
                "sha256": "38cb84f864dfdaa85c1d7e46d374be94d3d0fd0e2662ad278f42ccc4abcc785a"
            },
            "downloads": -1,
            "filename": "mlxtend-0.23.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7c2d97ce4c4f1278b0edc9934c45668",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 1449560,
            "upload_time": "2024-01-05T09:13:47",
            "upload_time_iso_8601": "2024-01-05T09:13:47.375637Z",
            "url": "https://files.pythonhosted.org/packages/1c/07/512f6a780239ad6ce06ce2aa7b4067583f5ddcfc7703a964a082c706a070/mlxtend-0.23.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df2ec5d81e019997909a8abe82992ae5c0db7ac138b6d12b13a579a0843d40bf",
                "md5": "c6b8301c03c300ead448efebcb1b4dc9",
                "sha256": "9f3075e3deac57f4452fee2c1f0befda58a24c1f9c26bed649a2303ca04baa29"
            },
            "downloads": -1,
            "filename": "mlxtend-0.23.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c6b8301c03c300ead448efebcb1b4dc9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 1340906,
            "upload_time": "2024-01-05T09:13:52",
            "upload_time_iso_8601": "2024-01-05T09:13:52.281388Z",
            "url": "https://files.pythonhosted.org/packages/df/2e/c5d81e019997909a8abe82992ae5c0db7ac138b6d12b13a579a0843d40bf/mlxtend-0.23.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 09:13:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rasbt",
    "github_project": "mlxtend",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "mlxtend"
}
        
Elapsed time: 0.16206s