Skip to content

Commit

Permalink
Simplify Adaptive Random Forest (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
smastelini authored Sep 19, 2023
1 parent 0539046 commit 487341b
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 277 deletions.
4 changes: 4 additions & 0 deletions docs/releases/unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ River's mini-batch methods now support pandas v2. In particular, River conforms
## anomaly

- Added `anomaly.LocalOutlierFactor`, which is an online version of the LOF algorithm for anomaly detection that matches the scikit-learn implementation.

## forest

- Simplify inner the structures of `forest.ARFClassifier` and `forest.ARFRegressor` by removing redundant class hierarchy. Simplify how concept drift logging can be accessed in individual trees and in the forest as a whole.
3 changes: 1 addition & 2 deletions river/base/drift_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from __future__ import annotations

import abc
import numbers

from . import base

Expand Down Expand Up @@ -58,7 +57,7 @@ class DriftDetector(_BaseDriftDetector):
"""A drift detector."""

@abc.abstractmethod
def update(self, x: numbers.Number) -> DriftDetector:
def update(self, x: int | float) -> DriftDetector:
"""Update the detector with a single data point.
Parameters
Expand Down
Loading

0 comments on commit 487341b

Please sign in to comment.