Skip to main content

Python implementation of SimplePPT algorithm, with GPU acceleration

Project description

PyPI Install & Load GitHub license Code style: black

SimplePPT

Python implementation of SimplePPT algorithm, with GPU acceleration.

Please cite the following paper if you use it:

Mao et al. (2015), SimplePPT: A simple principal tree algorithm, SIAM International Conference on Data Mining.

Installation

pip install -U simpleppt

Usage

from sklearn.datasets import make_classification
import simpleppt

X1, Y1 = make_classification(n_features=2, n_redundant=0, n_informative=2,
                             n_clusters_per_class=1, n_classes=3)

ppt=simpleppt.ppt(X1,Nodes=30,seed=1,progress=False,lam=10)
simpleppt.project_ppt(ppt,X1, c=Y1)

result

GPU dependencies (optional)

If you have a nvidia GPU, simpleppt can leverage CUDA computations for speedup in tree inference. The latest version of rapids framework is required (at least 0.17) it is recommanded to create a new conda environment:

conda create -n SimplePPT-gpu -c rapidsai -c nvidia -c conda-forge -c defaults \
    rapids=0.19 python=3.8 cudatoolkit=11.0 -y
conda activate SimplePPT-gpu
pip install simpleppt

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

simpleppt-1.0.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

simpleppt-1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file simpleppt-1.0.tar.gz.

File metadata

  • Download URL: simpleppt-1.0.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for simpleppt-1.0.tar.gz
Algorithm Hash digest
SHA256 f6785d9798fc7bb5243a3e249668c92211a86eb9279cc48229503e6e89355ad0
MD5 2fb23ad3beeb2aa8a1ae079664947bad
BLAKE2b-256 4979f31602387e81532a0cb85c0910df2ea791d4b4322ba30d3a6bfa4c5e55bd

See more details on using hashes here.

File details

Details for the file simpleppt-1.0-py3-none-any.whl.

File metadata

  • Download URL: simpleppt-1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.8

File hashes

Hashes for simpleppt-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 69c7151aede8f7ba87c12ace4fec462a13adf4eed6597c1dd3f90c6f50799749
MD5 be0e154d86a9cda7ef5cb0e10f031e5d
BLAKE2b-256 06b31a6a7479a1b61dfd5311c9322fb1e0db58484be7bee7fccaf7890573127f

See more details on using hashes here.

Supported by

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