Skip to content

Commit

Permalink
Updated version in pyproject.toml, updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
JBwdn committed Apr 10, 2024
1 parent 0a72557 commit 294e9b2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
46 changes: 44 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,56 @@
# coppice

Python decision tree and ensemble package using a rust backend.
A simple decision tree and random forest library using a Rust backend.

## Installation

### Development
```bash
pip install coppice
```

## Usage

### Python
```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

```bash
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

```bash
git clone [email protected]:JBwdn/coppice.git
cd coppice
pip install -e ".[dev]"
maturin develop
pre-commit install
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "maturin"

[project]
name = "coppice"
version = "0.1.0"
version = "0.2.0"
description = "A python and rust decision tree library"
readme = "README.md"
requires-python = ">=3.10"
Expand Down

0 comments on commit 294e9b2

Please sign in to comment.