A library consisting of useful tools and extensions for the day-to-day data science tasks.
Sebastian Raschka 2014-2015
Current version: 0.2.9
- Documentation: http://rasbt.github.io/mlxtend/
- Source code repository: https://github.com/rasbt/mlxtend
- PyPI: https://pypi.python.org/pypi/mlxtend
- Changelog: http://rasbt.github.io/mlxtend/changelog
- Contributing: http://rasbt.github.io/mlxtend/contributing
- Questions? Check out the Google Groups mailing list
## Recent changes
- Sequential Feature Selection algorithms: SFS, SFFS, and SFBS
- Neural Network / Multilayer Perceptron classifier
- Ordinary least square regression using different solvers (gradient and stochastic gradient descent, and the closed form solution)
To install mlxtend, just execute
pip install mlxtend
The mlxtend version on PyPI may always one step behind; you can install the latest development version from this GitHub repository by executing
pip install git+git://github.com/rasbt/mlxtend.git#egg=mlxtend
Alternatively, you download the package manually from the Python Package Index https://pypi.python.org/pypi/mlxtend, unzip it, navigate into the package, and use the command:
python setup.py install
from mlxtend.evaluate import plot_decision_regions
import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn.svm import SVC
### Loading some example data
iris = datasets.load_iris()
X = iris.data[:, [0,2]]
y = iris.target
### Training a classifier
svm = SVC(C=0.5, kernel='linear')
svm.fit(X,y)
### Plotting decision regions
plot_decision_regions(X, y, clf=svm, res=0.02, legend=2)
### Adding axes annotations
plt.xlabel('sepal length [cm]')
plt.ylabel('petal length [cm]')
plt.title('SVM on Iris')
plt.show()