Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
643 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "ranger-python-extension/pybind11"] | ||
path = ranger-python-extension/pybind11 | ||
url = https://github.com/pybind/pybind11.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.* | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: LLVM | ||
IndentWidth: 4 | ||
TabWidth: 4 | ||
BreakBeforeBraces: Linux | ||
ColumnLimit: 120 | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: None |
Oops, something went wrong.