A handy tool that helps you better visualize your data by plotting 2D decision boundaries, using any sklearn classifier models.
Project description
Deciplot
This is a handy tool that helps you better visualize your data by plotting 2D decision boundaries, using any sklearn classifier models.
Installation
Run the following to install:
pip install deciplot
Usage
from sklearn.datasets import load_iris
from sklearn.tree import DecisionTreeClassifier
from deciplot import DeciPlot2D
# Get iris dataset from sklearn
iris = load_iris()
X, y, feature_names, target_names = iris['data'], iris['target'], iris['feature_names'], iris['target_names']
# Initialize a classifier model for plotting decision boundaries
dtree = DecisionTreeClassifier()
# Initialize an DecPlot2D object
dp2d = DeciPlot2D(X, y, feature_names, target_names, dtree)
# Plot and visualize decision boundaries
dp2d.plot(figsize=(20, 10))
After running this code, we'll get this beautiful plot:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deciplot-0.0.1.tar.gz.
File metadata
- Download URL: deciplot-0.0.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e647d5f26dc4f62c627d56d07c6a496340a248f400a7f26d0f27b46695f8e54
|
|
| MD5 |
c3d65e6bada26359f2522fe211d5f566
|
|
| BLAKE2b-256 |
0bd38aecb460f5cdd36b60afb5b293de13f0d403b43c42531f6c6a2cb7385dd2
|
File details
Details for the file deciplot-0.0.1-py3-none-any.whl.
File metadata
- Download URL: deciplot-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f3b0e5c5236ab65f9803a1f20f9356176c22f0e005b85497ca9c7ba064a9a6d
|
|
| MD5 |
f7fb3e6f60423aaef433943fd5ccaedf
|
|
| BLAKE2b-256 |
2aeb2de3a28b3236b49b3b46b490c617c8897186731fbd479c9e22da52c0e160
|