Skip to content

Commit

Permalink
Merge 0ae074c into 9e5c003
Browse files Browse the repository at this point in the history
  • Loading branch information
svenpeter42 committed May 20, 2016
2 parents 9e5c003 + 0ae074c commit 99ce9b0
Show file tree
Hide file tree
Showing 28 changed files with 643 additions and 39 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "ranger-python-extension/pybind11"]
path = ranger-python-extension/pybind11
url = https://github.com/pybind/pybind11.git
2 changes: 2 additions & 0 deletions ranger-python-extension/.gitignore
@@ -0,0 +1,2 @@
.*
build
33 changes: 33 additions & 0 deletions ranger-python-extension/README.md
@@ -0,0 +1,33 @@
## ranger python bindings

### Overview

These are pretty minimal python bindings for ranger - they work but don't expose much functionality. Essentially only a RandomForestClassifier class with sklearn-like API is exposed.


### Installation

```
git submodule update --init --recursive
./waf configure
./waf
./waf install
```

### Example usage

```python
import pyranger
import numpy as np
from sklearn import datasets

iris = datasets.load_iris()
X = iris.data
y = iris.target

rf = pyranger.RandomForestClassifier()
rf.fit(X, y)
y_pred = rf.predict(X)

print(np.where(y_pred != y))
```
1 change: 1 addition & 0 deletions ranger-python-extension/pybind11
Submodule pybind11 added at 54b4ac
9 changes: 9 additions & 0 deletions ranger-python-extension/src/.clang-format
@@ -0,0 +1,9 @@
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
BreakBeforeBraces: Linux
ColumnLimit: 120
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: None

0 comments on commit 99ce9b0

Please sign in to comment.