SciKits

Quick search

scikit-vis

version 0.1.0.dev1

stunning, one-line visualizations for scikit-learn

Download: https://pypi.python.org/pypi/scikit-vis
Homepage: https://github.com/quantum-programmer/scikit-vis
PyPI: http://pypi.python.org/pypi/scikit-vis
People: Hans Musgrave

Description

# scikit-vis: Scikit-Learn with Visualizations
scikit-vis adds **gorgeous**, **easy-to-use** graphics to the massively popular scikit-learn. I grew tired of writing and maintaining 50+ lines of code for every cool graphic I found in the scikit-learn docs, so I included them in scikit-vis with sensible defaults. I want any machine learning visualization to **only take one line of code.**

## See for yourself how easy it is.
In the following example, we train a mediocre classifier `clf`, and it takes exactly **one** additional line of code to generate a stunning confusion matrix.
```python
\""\"
We need to have a model before we can plot anything using that model.
\""\"
from skvis.datasets import load_digits
from skvis.linear_model import RidgeClassifier
from skvis.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(*load_digits(n_class=5, return_X_y=True))
clf = RidgeClassifier().fit(X_train, y_train)

\""\"
Here is where the magic happens.
\""\"
clf.plot_confusion_matrix(X_test, y_test)
```

![alt-text](https://github.com/quantum-programmer/scikit-vis/blob/master/doc/source/media/confusion_matrix.png?s=200 \"Scikit-learn Digits Confusion Matrix\")

## Who\'s this for?
Anyone who uses scikit-learn. Seriously. Yes, you. The scikit-vis API exposes EVERY function and class from scikit-learn, and it adds powerful, expressive plotting syntax tailored to your machine-learning needs. There is literally nothing to lose.

## Installation
Installation is a breeze! Just run:
```bash
pip install scikit-vis
```
Or, if you want the latest development version, clone this repo and run
```bash
python setup.py install
```
at the root folder.

COMING SOON!
If you are using conda, you can install scikit-vis by running:
```bash
conda install -c conda-forge scikit-vis
```

## If scikit-vis can do everything Scikit-learn does, why do I need Scikit-learn installed?
scikit-vis is monkeypatched on top of scikit-learn. At installation, it inspects live versions of scikit-learn and automatically generates necessary source files. At runtime, it loads scikit-learn objects whenever scikit-vis is requested and adds additional functionality to the live objects.

## What now? Is that safe? Is that legal??
Trust me; it\'s better this way. The scikit-learn developers did an excellent job of documenting and maintaining their code so that the same monkeypatching on my end works for every version of their code.

What does that mean for you? I\'m glad you asked. That means you can mix and match versions to your heart\'s content. The machine-learning from scikit-learn is decoupled from the plotting here at scikit-vis, and you can update either one without the other. Better yet, that means fewer bugs since I only have to create and maintain one copy of scikit-vis. That means more time rolling out cutting-edge features for your latest project.

Installation

PyPI

You can download the latest distribution from PyPI here: http://pypi.python.org/pypi/scikit-vis

Using pip

You can install scikit-vis for yourself from the terminal by running:

pip install --user scikit-vis

If you want to install it for all users on your machine, do:

pip install scikit-vis
On Linux, do sudo pip install scikit-vis.

If you don't yet have the pip tool, you can get it following these instructions.

This package was discovered in PyPI.