Skip to main content

A python and rust decision tree library

Project description

coppice

A simple decision tree and random forest library using a Rust backend.

Installation

pip install coppice

Usage

Python

import numpy as np

from coppice import _coppice

x = ... # [w, n]
y = ... # [n]

x = x.astype(np.float32)
y = y.astype(np.uint32)

_coppice.train_tree_np(x, y, max_depth=5)

_coppice.train_forest_np(x, y, max_depth=5, num_trees=10)

CLI

usage: coppice_ [-h] [--model-type {tree,forest}] [--num-trees NUM_TREES]
                [--max-depth MAX_DEPTH]
                x-path y-path

positional arguments:
  x-path
  y-path

options:
  -h, --help            show this help message and exit
  --model-type {tree,forest}
  --num-trees NUM_TREES
  --max-depth MAX_DEPTH

Development

git clone git@github.com:JBwdn/coppice.git
cd coppice
pip install -e ".[dev]"
maturin develop
pre-commit install

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

coppice-0.2.0.tar.gz (240.2 kB view hashes)

Uploaded Source

Built Distributions

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

coppice-0.2.0-pp310-pypy310_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded PyPy manylinux: glibc 2.12+ i686

coppice-0.2.0-cp312-none-win_amd64.whl (165.2 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

coppice-0.2.0-cp312-none-win32.whl (155.0 kB view hashes)

Uploaded CPython 3.12 Windows x86

coppice-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

coppice-0.2.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

coppice-0.2.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

coppice-0.2.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

coppice-0.2.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

coppice-0.2.0-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.12+ i686

coppice-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (271.1 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

coppice-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl (283.6 kB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

coppice-0.2.0-cp311-none-win_amd64.whl (166.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

coppice-0.2.0-cp311-none-win32.whl (157.9 kB view hashes)

Uploaded CPython 3.11 Windows x86

coppice-0.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

coppice-0.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

coppice-0.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

coppice-0.2.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

coppice-0.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

coppice-0.2.0-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.12+ i686

coppice-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (273.6 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coppice-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl (286.6 kB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

coppice-0.2.0-cp310-none-win_amd64.whl (166.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

coppice-0.2.0-cp310-none-win32.whl (157.8 kB view hashes)

Uploaded CPython 3.10 Windows x86

coppice-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

coppice-0.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

coppice-0.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

coppice-0.2.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

coppice-0.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

coppice-0.2.0-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686

coppice-0.2.0-cp310-cp310-macosx_11_0_arm64.whl (273.6 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coppice-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl (286.7 kB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

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