https://github.com/bing-su/jrcf
Random Cut Forest
https://github.com/bing-su/jrcf
random-cut-forest rcf
Last synced: 2 months ago
JSON representation
Random Cut Forest
- Host: GitHub
- URL: https://github.com/bing-su/jrcf
- Owner: Bing-su
- License: apache-2.0
- Created: 2024-11-08T04:28:07.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-02T08:32:25.000Z (2 months ago)
- Last Synced: 2025-04-12T22:04:05.192Z (2 months ago)
- Topics: random-cut-forest, rcf
- Language: Python
- Homepage:
- Size: 4.29 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JRCF
Java Random Cut Forest
https://github.com/aws/random-cut-forest-by-aws 저장소의 `python_rcf_wrapper`를 참고하여 파이썬에서 실행할 수 있도록 구성한 Random Cut Forest 알고리즘입니다.
## Requirements
- Java 8 or later
## Installation
```sh
pip install jrcf
```## Usage
```python
import numpy as np
from tqdm.auto import tqdmfrom jrcf.rcf import RandomCutForestModel
dim = 5
forest = RandomCutForestModel(dimensions=dim)
TEST_DATA = np.random.normal(size=(100000, dim))for point in tqdm(TEST_DATA):
score = forest.score(point)
forest.update(point)pp = [999] * dim
print(forest.score(pp))
```