Skip to content

Commit

Permalink
adding new README
Browse files Browse the repository at this point in the history
  • Loading branch information
tabacof committed Oct 25, 2023
1 parent b7b2b72 commit 19bbb97
Showing 1 changed file with 78 additions and 4 deletions.
82 changes: 78 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,70 @@
# Rustrees
Decision trees, random and causal forests in Rust.
# Rustrees: Decision Trees & Random Forests in Rust with Python Bindings

Work in progress, stay tuned!
[![Build Status](https://travis-ci.com/yourusername/rustrees.svg?branch=main)](https://travis-ci.com/yourusername/rustrees)
[![PyPI version](https://badge.fury.io/py/rustrees.svg)](https://badge.fury.io/py/rustrees)
[![Rust Package](https://img.shields.io/crates/v/rustrees)](https://crates.io/crates/rustrees)
[![Documentation](https://docs.rs/rustrees/badge.svg)](https://docs.rs/rustrees)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)

## Using Python library
## Overview

Rustrees is an efficient decision tree and random forest library written in Rust with Python bindings. It aims to provide speed comparable to Sklearn with the reliability and performance of Rust.

### Features

- 🏎️ **Speed**: As fast as Sklearn on average.
- 🔗 **Python Bindings**: Effortless integration with Python.
- 🔒 **Type Safety**: Benefit from Rust's strong type system.

### Limitations

- ⚙️ **Limited Configuration**: Currently supports a basic set of hyperparameters.

## Python

### Installation

```bash
pip install rustrees
```

### Quick Start

```python
from rustrees import DecisionTreeClassifier

X = [[1, 2], [3, 4], [5, 6]]
y = [0, 1, 0]

clf = DecisionTreeClassifier()
clf.fit(X, y)

predictions = clf.predict([[2, 3], [4, 5]])
```

## Rust

### Installation

```bash
cargo install rustrees
```

### Quick Start

```rust
use rustrees::DecisionTreeClassifier;

let X = vec![vec![1.0, 2.0], vec![3.0, 4.0], vec![5.0, 6.0]];
let y = vec![0, 1, 0];

let mut clf = DecisionTreeClassifier::new();
clf.fit(&X, &y);

let predictions = clf.predict(&vec![vec![2.0, 3.0], vec![4.0, 5.0]]);
```

### Development

First, create a virtualenv (this just needs to be done once):
```bash
Expand Down Expand Up @@ -35,3 +96,16 @@ And then import the library in the notebook:
from rustrees.rustrees import DecisionTree, RandomForest
import rustrees.tree as rt
```

## API Documentation

- Python API: [Link](https://your-python-docs-link.com)
- Rust API: [Link](https://docs.rs/rustrees)

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

0 comments on commit 19bbb97

Please sign in to comment.