{"id":18414778,"url":"https://github.com/navdeep-g/robust-random-cut-forest","last_synced_at":"2026-02-28T00:40:08.438Z","repository":{"id":145427568,"uuid":"330438967","full_name":"navdeep-G/robust-random-cut-forest","owner":"navdeep-G","description":"Implementation of the Robust Random Cut Forest algorithm for anomaly detection","archived":false,"fork":false,"pushed_at":"2024-12-27T02:01:24.000Z","size":29,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-20T06:41:20.374Z","etag":null,"topics":["machine-learning","outlier-detector","outliers","python","random-forest","robust-random-cut-forest"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/navdeep-G.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-17T16:47:59.000Z","updated_at":"2024-12-27T02:01:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a59d305c-a46d-4654-b4e6-ea2144b823ff","html_url":"https://github.com/navdeep-G/robust-random-cut-forest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/navdeep-G/robust-random-cut-forest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navdeep-G%2Frobust-random-cut-forest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navdeep-G%2Frobust-random-cut-forest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navdeep-G%2Frobust-random-cut-forest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navdeep-G%2Frobust-random-cut-forest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navdeep-G","download_url":"https://codeload.github.com/navdeep-G/robust-random-cut-forest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navdeep-G%2Frobust-random-cut-forest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267334188,"owners_count":24070520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["machine-learning","outlier-detector","outliers","python","random-forest","robust-random-cut-forest"],"created_at":"2024-11-06T03:52:17.822Z","updated_at":"2026-02-28T00:40:03.388Z","avatar_url":"https://github.com/navdeep-G.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robust Random Cut Forests\n\nThis repository contains an implementation of the `Robust Random Cut Forest` anomaly detection model. This model attempts to find anomalies by seeking out points whose structure is not consistent with the rest of the data set. The `random_cut_forest` folder contains the `RandomCutForest` algorithm while the `notebooks` folder contains Jupyter notebooks showing examples leveraging the module.\n\n## Contributing\nIf you want to contribute to this repo simply submit a pull request.\n\n## Getting Started\n\n### Installation\nTo install the package you can do any of the following:\n\n- Run the command `pip install ...`\n\n### Using RobustRandomCutForests\nUsing a RobustRandomCutForest to classify potential anomalies in your data is simple. Assuming you already have a vector of data stored in `X` you would run the following:\n\n```python\nfrom robust_random_cut_forest import robust_random_cut_forest\nforest = robust_random_cut_forest.RobustRandomCutForest()\nforest = forest.fit(X)\n```\n\nFrom there you can choose to get the normalized depths of each point within the forest by calling `average_depths` or have the forest label potential anomalies by calling `predict`:\n\n```python\ndepths = forest.decision_function(X)\nlabels = forest.predict(X)\n```\n\nThe function `decision_function` will return an array with numbers ranging from zero to one. The lower the number the more anomalous the point appears (this is how sklearn implements scoring). By default any points that are given a score of `0.3` are labelled as anomalies. To stream new points into your forest simply call the `add_point` method:\n\n```python\n# Given an array of points....\nfor point in points:\n    forest.add_point(point)\ndepths = forest.decision_function(points)\nlabels = forest.predict(points)\n```\n\n## Testing\nAll tests are written using `pytest`. Simply `pip install pytest` to be able to run tests. All tests are located under the `tests` folder. Any new tests are always welcome!\n\n## Articles\n* For more information on Robust Random Cut Forests, see Guha et al.'s 2016 paper\nwhich can be located [here](http://jmlr.org/proceedings/papers/v48/guha16.pdf).\n* The original isolation forest paper can be found [here](http://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf).\n* Isolation Forests have been implemented in [sklearn](http://scikit-learn.org/dev/modules/generated/sklearn.ensemble.IsolationForest.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavdeep-g%2Frobust-random-cut-forest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavdeep-g%2Frobust-random-cut-forest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavdeep-g%2Frobust-random-cut-forest/lists"}