Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxHalford committed Dec 2, 2023
1 parent 4dff1df commit 715942d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion river/metrics/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ClassificationMetric(Metric):

_fmt = ".2%" # output a percentage, e.g. 0.427 becomes "42,7%"

def __init__(self, cm: "confusion.ConfusionMatrix" | None = None):
def __init__(self, cm=None):
# HACK: there is a circular dependency between ConfusionMatrix and ClassificationMetric. We
# use ConfusionMatrix here so as to express metrics in terms of false/true
# positives/negatives. But for UX reasons, we also want ConfusionMatrix to be a
Expand Down
3 changes: 1 addition & 2 deletions river/metrics/confusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import functools
from collections import defaultdict

from river import metrics
from river import utils
from river import metrics, utils


class ConfusionMatrix(metrics.base.MultiClassMetric):
Expand Down
2 changes: 2 additions & 0 deletions river/stats/_rust_stats.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

class RsQuantile:
def __init__(self, q: float): ...
def update(self, x: float): ...
Expand Down

0 comments on commit 715942d

Please sign in to comment.