OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

rrcf

rrcf is a library implementing the Robust Random Cut Forest algorithm for detecting outliers in streaming data, with an RCTree API for tree operations and anomaly scoring.

Independent OpenViST project profile, based on linked sources.

rrcf — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use rrcf when implementing Robust Random Cut Forest outlier detection for streaming data or when you need the documented RCTree operations.

Who it is for

  • Developers building streaming-data anomaly detection workflows.
  • Users who need direct operations for inserting, querying or scoring points in an RCTree.

Documented uses

  • Insert points into a tree and calculate displacement-based scores.
  • Query a tree for the nearest leaf or check whether a point is a duplicate.
  • Serialize an RCTree to a nested dictionary and restore it later.
Before you choose

Requirements & limits

  • The documented RCTree methods include point insertion and deletion, nearest-leaf queries, duplicate checks, bounding-box calculation and displacement scores.
  • The documentation describes serialization through nested dictionaries, with JSON shown as an example.
  • The project description identifies ensemble and batch anomaly-detection workflows, while the supplied API page focuses on individual RCTree operations.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Insert a point and compute its collusive displacement

Add a point to an RCTree and obtain its collusive displacement score.

Before you start

  • An rrcf.RCTree instance.
  • A point represented as a NumPy array with shape 1 × d.
  • A hashable identifier for the new leaf.

Steps

  1. Create an RCTree, optionally initialized with data.

  2. Insert the point using tree.insert_point(point, index=identifier).

  3. Compute the score with tree.codisp(identifier).

Expected outcome

The point is stored as a leaf, and `codisp` returns its collusive displacement as a float.

Guide limitations

  • The documentation does not specify score thresholds or how to interpret a score as an anomaly decision.
  • Insertion accepts a tolerance for duplicate-point handling, but its default behavior is not further described.
Source-based practical guide

Serialize an RCTree and restore it from a dictionary

Save an RCTree as a nested dictionary and create a new tree from that representation.

Before you start

  • An rrcf.RCTree instance to serialize.
  • A nested dictionary representing an RCTree to restore; the documentation shows JSON as one way to write and read the dictionary.

Steps

  1. Call tree.to_dict() to obtain the nested dictionary.

  2. Write the dictionary to a file with JSON, as shown in the API example, if file storage is needed.

  3. Read the dictionary back from the file if applicable.

  4. Call rrcf.RCTree.from_dict(obj) to create a new RCTree from the dictionary.

Expected outcome

A new RCTree instance is created from the serialized tree representation.

Guide limitations

  • The API documentation does not describe compatibility or validation requirements for serialized dictionaries.
  • Using load_dict(obj) instead of from_dict(obj) replaces all data in the current RCTree.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
7 November 2026
Original website title
rrcf 🌲🌲🌲 | rrcf · Official homepage title · retained in its source language