Skip to content

Commit

Permalink
docs: rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
tachyonicClock committed Jul 25, 2024
1 parent 01d270f commit 748cc94
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 14 deletions.
24 changes: 21 additions & 3 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,22 @@ capymoa.

.. autosummary::
:toctree: modules
:caption: Types
:recursive:

capymoa.base
capymoa.type_alias
capymoa.instance

Datastreams
-----------
Data Streams
------------

These modules provide classes for handling datastreams.
These modules provide classes for loading, and simulating data streams. It also
includes utilities for simulating concept drifts.

.. autosummary::
:toctree: modules
:caption: Data Streams
:recursive:

capymoa.datasets
Expand All @@ -42,20 +45,34 @@ and semi-supervised learning.

.. autosummary::
:toctree: modules
:caption: Learners
:recursive:

capymoa.classifier
capymoa.regressor
capymoa.anomaly
capymoa.ssl

Drift Detection
---------------

These modules provide classes for detecting concept drifts.

.. autosummary::
:toctree: modules
:caption: Drift Detection
:recursive:

capymoa.drift

Evaluation
----------

These modules provide classes for evaluating learners.

.. autosummary::
:toctree: modules
:caption: Evaluation
:recursive:

capymoa.splitcriteria
Expand All @@ -69,6 +86,7 @@ These modules provide miscellaneous utilities.

.. autosummary::
:toctree: modules
:caption: Miscellaneous
:recursive:

capymoa.misc
Expand Down
9 changes: 5 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@
]

nitpick_ignore_regex = [
("py:class", r"sklearn\..*"),
("py:class", r"numpy\..*"),
("py:class", r"pathlib\..*"),
("py:class", r"abc\..*"),
("py:class", r"moa\..*"),
("py:class", r"com\..*"),
("py:class", r"java\..*"),
("py:class", r"moa\..*"),
("py:class", r"numpy\..*"),
("py:class", r"org\..*"),
("py:class", r"pandas\..*"),
("py:class", r"pathlib\..*"),
("py:class", r"sklearn\..*"),
("py:class", r"torch\..*"),
]
toc_object_entries_show_parents = "hide"
Expand Down
2 changes: 1 addition & 1 deletion src/capymoa/drift/detectors/ddm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DDM(MOADriftDetector):
"""Drift-Detection-Method (DDM) Drift Detector
Example:
-------
--------
>>> import numpy as np
>>> from capymoa.drift.detectors import DDM
Expand Down
2 changes: 1 addition & 1 deletion src/capymoa/drift/detectors/page_hinkley.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PageHinkley(MOADriftDetector):
Reference:
----------
Page. 1954. Continuous Inspection Schemes. Biometrika 41, 1/2 (1954),
Page. 1954. Continuous Inspection Schemes. Biometrika 41, 1/2 (1954),
100-115.
"""
Expand Down
5 changes: 2 additions & 3 deletions src/capymoa/drift/eval_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, max_delay: int):
"""
:param max_delay: Maximum number of instances to wait for a detection
[after which the drift becomes obvious and the detector is considered to have missed the change]
[after which the drift becomes obvious and the detector is considered to have missed the change]
"""

self.max_delay = max_delay
Expand All @@ -71,8 +71,7 @@ def calc_performance(self, preds: ArrayLike, trues: ArrayLike) -> pd.Series:
:param preds: (array): detection location (index) values
:param trues: (array): actual location (index) of drift. For drifts based on an interval (e.g gradual drifts),
the current approach is to define it using the starting location and the max_delay parameter
the current approach is to define it using the starting location and the max_delay parameter
:return: pd.Series with a performance summary
"""

Expand Down
10 changes: 8 additions & 2 deletions src/capymoa/stream/preprocessing/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from capymoa.stream import Schema, Stream
from capymoa.instance import Instance
from moa.streams import FilteredQueueStream
from moa.streams.filters import StreamFilter
import moa.streams.filters


class Transformer(ABC):
Expand All @@ -23,7 +23,13 @@ def restart(self):


class MOATransformer(Transformer):
def __init__(self, schema=None, moa_filter: StreamFilter | None = None, CLI=None):

def __init__(
self,
schema=None,
moa_filter: moa.streams.filters.StreamFilter | None = None,
CLI=None,
):
self.schema = schema
self.CLI = CLI
self.moa_filter = moa_filter
Expand Down

0 comments on commit 748cc94

Please sign in to comment.