Skip to main content

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:

Decision boundary plot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deciplot-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deciplot-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

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

Hashes for deciplot-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1e647d5f26dc4f62c627d56d07c6a496340a248f400a7f26d0f27b46695f8e54
MD5 c3d65e6bada26359f2522fe211d5f566
BLAKE2b-256 0bd38aecb460f5cdd36b60afb5b293de13f0d403b43c42531f6c6a2cb7385dd2

See more details on using hashes here.

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

Hashes for deciplot-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2f3b0e5c5236ab65f9803a1f20f9356176c22f0e005b85497ca9c7ba064a9a6d
MD5 f7fb3e6f60423aaef433943fd5ccaedf
BLAKE2b-256 2aeb2de3a28b3236b49b3b46b490c617c8897186731fbd479c9e22da52c0e160

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page