deep-river 0.2.7__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {deep_river-0.2.7 → deep_river-0.3.0}/PKG-INFO +55 -116
  2. {deep_river-0.2.7 → deep_river-0.3.0}/README.md +34 -10
  3. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/__version__.py +1 -1
  4. deep_river-0.3.0/deep_river/anomaly/__init__.py +23 -0
  5. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/anomaly/ae.py +185 -29
  6. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/anomaly/probability_weighted_ae.py +101 -16
  7. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/anomaly/rolling_ae.py +116 -10
  8. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/anomaly/scaler.py +3 -8
  9. deep_river-0.3.0/deep_river/base.py +700 -0
  10. deep_river-0.3.0/deep_river/classification/__init__.py +23 -0
  11. deep_river-0.3.0/deep_river/classification/classifier.py +598 -0
  12. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/classification/rolling_classifier.py +209 -30
  13. deep_river-0.3.0/deep_river/classification/zoo.py +277 -0
  14. deep_river-0.3.0/deep_river/regression/__init__.py +21 -0
  15. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/regression/multioutput.py +119 -14
  16. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/regression/regressor.py +124 -22
  17. deep_river-0.3.0/deep_river/regression/rolling_regressor.py +436 -0
  18. deep_river-0.3.0/deep_river/regression/zoo.py +234 -0
  19. deep_river-0.3.0/deep_river/utils/estimator_checks.py +70 -0
  20. deep_river-0.3.0/deep_river/utils/inspect.py +7 -0
  21. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/params.py +3 -9
  22. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/tensor_conversion.py +60 -20
  23. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/test_estimators.py +8 -8
  24. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/test_tensor_conversion.py +14 -20
  25. deep_river-0.3.0/pyproject.toml +83 -0
  26. deep_river-0.2.7/deep_river/anomaly/__init__.py +0 -21
  27. deep_river-0.2.7/deep_river/base.py +0 -320
  28. deep_river-0.2.7/deep_river/classification/__init__.py +0 -16
  29. deep_river-0.2.7/deep_river/classification/classifier.py +0 -350
  30. deep_river-0.2.7/deep_river/classification/zoo.py +0 -266
  31. deep_river-0.2.7/deep_river/regression/__init__.py +0 -17
  32. deep_river-0.2.7/deep_river/regression/rolling_regressor.py +0 -227
  33. deep_river-0.2.7/deep_river/regression/zoo.py +0 -169
  34. deep_river-0.2.7/deep_river/utils/estimator_checks.py +0 -21
  35. deep_river-0.2.7/deep_river.egg-info/PKG-INFO +0 -291
  36. deep_river-0.2.7/deep_river.egg-info/SOURCES.txt +0 -36
  37. deep_river-0.2.7/deep_river.egg-info/dependency_links.txt +0 -1
  38. deep_river-0.2.7/deep_river.egg-info/requires.txt +0 -102
  39. deep_river-0.2.7/deep_river.egg-info/top_level.txt +0 -1
  40. deep_river-0.2.7/pyproject.toml +0 -63
  41. deep_river-0.2.7/setup.cfg +0 -9
  42. deep_river-0.2.7/setup.py +0 -111
  43. {deep_river-0.2.7 → deep_river-0.3.0}/LICENSE +0 -0
  44. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/__init__.py +0 -0
  45. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/__init__.py +0 -0
  46. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/hooks.py +0 -0
  47. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/layer_adaptation.py +0 -0
  48. {deep_river-0.2.7 → deep_river-0.3.0}/deep_river/utils/test_layer_adaptation.py +0 -0
@@ -1,120 +1,34 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: deep_river
3
- Version: 0.2.7
3
+ Version: 0.3.0
4
4
  Summary: Online Deep Learning for river
5
- Home-page: https://online-ml.github.io/deep-river/
5
+ License: BSD-3-Clause
6
+ Keywords: online-learning,deep-learning,data-streams
6
7
  Author: Cedric Kulbach
7
8
  Author-email: cedric.kulbach@googlemail.com
8
- License: BSD-3
9
+ Requires-Python: >=3.10,<3.13
9
10
  Classifier: License :: OSI Approved :: BSD License
10
11
  Classifier: Programming Language :: Python
11
12
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
- Classifier: Programming Language :: Python :: 3.9
14
13
  Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
15
16
  Classifier: Programming Language :: Python :: Implementation :: CPython
16
17
  Classifier: Programming Language :: Python :: Implementation :: PyPy
17
- Requires-Python: >=3.6.0
18
+ Requires-Dist: mkdocstrings[python] (>=0.19.0)
19
+ Requires-Dist: numpy (>=1.26.4,<1.27.0)
20
+ Requires-Dist: pandas (>=2.2.2,<2.3.0)
21
+ Requires-Dist: pytkdocs[numpy-style] (>=0.5.0)
22
+ Requires-Dist: river
23
+ Requires-Dist: scikit-learn (>=1.5.0,<1.6.0)
24
+ Requires-Dist: sortedcontainers (>=2.4.0,<3.0.0)
25
+ Requires-Dist: torch (==2.2.2)
26
+ Requires-Dist: torchviz (>=0.0.2,<0.1.0)
27
+ Requires-Dist: tqdm (>=4.66.5,<4.67.0)
28
+ Project-URL: Documentation, https://github.com/online-ml/deep-river
29
+ Project-URL: Homepage, https://github.com/online-ml/deep-river
30
+ Project-URL: Repository, https://github.com/online-ml/deep-river
18
31
  Description-Content-Type: text/markdown
19
- License-File: LICENSE
20
- Requires-Dist: scikit-learn~=1.5.0
21
- Requires-Dist: torch~=2.2.2
22
- Requires-Dist: pandas~=2.2.2
23
- Requires-Dist: numpy~=1.26.4
24
- Requires-Dist: river~=0.21.2
25
- Requires-Dist: scipy~=1.13.0
26
- Requires-Dist: tqdm~=4.66.5
27
- Requires-Dist: ordered-set~=4.1.0
28
- Requires-Dist: torchviz~=0.0.2
29
- Provides-Extra: dev
30
- Requires-Dist: scikit-learn~=1.5.0; extra == "dev"
31
- Requires-Dist: torch~=2.2.2; extra == "dev"
32
- Requires-Dist: pandas~=2.2.2; extra == "dev"
33
- Requires-Dist: numpy~=1.26.4; extra == "dev"
34
- Requires-Dist: river~=0.21.2; extra == "dev"
35
- Requires-Dist: scipy~=1.13.0; extra == "dev"
36
- Requires-Dist: tqdm~=4.66.5; extra == "dev"
37
- Requires-Dist: ordered-set~=4.1.0; extra == "dev"
38
- Requires-Dist: torchviz~=0.0.2; extra == "dev"
39
- Requires-Dist: graphviz>=0.20.3; extra == "dev"
40
- Requires-Dist: matplotlib>=3.9.2; extra == "dev"
41
- Requires-Dist: mypy>=1.11.1; extra == "dev"
42
- Requires-Dist: pre-commit>=3.8.0; extra == "dev"
43
- Requires-Dist: pytest>=8.3.2; extra == "dev"
44
- Requires-Dist: pytest-cov>=5.0.0; extra == "dev"
45
- Requires-Dist: black>=24.8.0; extra == "dev"
46
- Requires-Dist: flake8>=7.1.1; extra == "dev"
47
- Requires-Dist: isort>=5.13.2; extra == "dev"
48
- Requires-Dist: jupyter>=1.0.0; extra == "dev"
49
- Requires-Dist: pyupgrade==3.17.0; extra == "dev"
50
- Provides-Extra: docs
51
- Requires-Dist: scikit-learn~=1.5.0; extra == "docs"
52
- Requires-Dist: torch~=2.2.2; extra == "docs"
53
- Requires-Dist: pandas~=2.2.2; extra == "docs"
54
- Requires-Dist: numpy~=1.26.4; extra == "docs"
55
- Requires-Dist: river~=0.21.2; extra == "docs"
56
- Requires-Dist: scipy~=1.13.0; extra == "docs"
57
- Requires-Dist: tqdm~=4.66.5; extra == "docs"
58
- Requires-Dist: ordered-set~=4.1.0; extra == "docs"
59
- Requires-Dist: torchviz~=0.0.2; extra == "docs"
60
- Requires-Dist: flask>=2.0.2; extra == "docs"
61
- Requires-Dist: ipykernel>=6.9.0; extra == "docs"
62
- Requires-Dist: mike>=0.5.3; extra == "docs"
63
- Requires-Dist: mkdocs>=1.2.3; extra == "docs"
64
- Requires-Dist: mkdocs-awesome-pages-plugin>=2.7.0; extra == "docs"
65
- Requires-Dist: mkdocs-gen-files>=0.3.5; extra == "docs"
66
- Requires-Dist: mkdocs-charts-plugin>=0.0.8; extra == "docs"
67
- Requires-Dist: mkdocs-literate-nav>=0.4.1; extra == "docs"
68
- Requires-Dist: mkdocs-material>=8.1.11; extra == "docs"
69
- Requires-Dist: mkdocstrings[python]>=0.19.0; extra == "docs"
70
- Requires-Dist: pytkdocs[numpy-style]>=0.5.0; extra == "docs"
71
- Requires-Dist: ipython_genutils>=0.1.0; extra == "docs"
72
- Requires-Dist: mkdocs-jupyter>=0.20.0; extra == "docs"
73
- Requires-Dist: nbconvert>=6.4.2; extra == "docs"
74
- Requires-Dist: numpydoc>=1.2; extra == "docs"
75
- Requires-Dist: spacy>=3.2.2; extra == "docs"
76
- Requires-Dist: jinja2>=3.0.3; extra == "docs"
77
- Requires-Dist: dominate; extra == "docs"
78
- Requires-Dist: jupyter-client; extra == "docs"
79
- Requires-Dist: mkdocs-charts-plugin; extra == "docs"
80
- Requires-Dist: python-slugify; extra == "docs"
81
- Requires-Dist: watermark==2.3.1; extra == "docs"
82
- Provides-Extra: all
83
- Requires-Dist: graphviz>=0.20.3; extra == "all"
84
- Requires-Dist: matplotlib>=3.9.2; extra == "all"
85
- Requires-Dist: mypy>=1.11.1; extra == "all"
86
- Requires-Dist: pre-commit>=3.8.0; extra == "all"
87
- Requires-Dist: pytest>=8.3.2; extra == "all"
88
- Requires-Dist: pytest-cov>=5.0.0; extra == "all"
89
- Requires-Dist: black>=24.8.0; extra == "all"
90
- Requires-Dist: flake8>=7.1.1; extra == "all"
91
- Requires-Dist: isort>=5.13.2; extra == "all"
92
- Requires-Dist: jupyter>=1.0.0; extra == "all"
93
- Requires-Dist: pyupgrade==3.17.0; extra == "all"
94
- Requires-Dist: flask>=2.0.2; extra == "all"
95
- Requires-Dist: ipykernel>=6.9.0; extra == "all"
96
- Requires-Dist: mike>=0.5.3; extra == "all"
97
- Requires-Dist: mkdocs>=1.2.3; extra == "all"
98
- Requires-Dist: mkdocs-awesome-pages-plugin>=2.7.0; extra == "all"
99
- Requires-Dist: mkdocs-gen-files>=0.3.5; extra == "all"
100
- Requires-Dist: mkdocs-charts-plugin>=0.0.8; extra == "all"
101
- Requires-Dist: mkdocs-literate-nav>=0.4.1; extra == "all"
102
- Requires-Dist: mkdocs-material>=8.1.11; extra == "all"
103
- Requires-Dist: mkdocstrings[python]>=0.19.0; extra == "all"
104
- Requires-Dist: pytkdocs[numpy-style]>=0.5.0; extra == "all"
105
- Requires-Dist: ipython_genutils>=0.1.0; extra == "all"
106
- Requires-Dist: mkdocs-jupyter>=0.20.0; extra == "all"
107
- Requires-Dist: nbconvert>=6.4.2; extra == "all"
108
- Requires-Dist: numpydoc>=1.2; extra == "all"
109
- Requires-Dist: spacy>=3.2.2; extra == "all"
110
- Requires-Dist: jinja2>=3.0.3; extra == "all"
111
- Requires-Dist: dominate; extra == "all"
112
- Requires-Dist: jupyter-client; extra == "all"
113
- Requires-Dist: mkdocs-charts-plugin; extra == "all"
114
- Requires-Dist: python-slugify; extra == "all"
115
- Requires-Dist: watermark==2.3.1; extra == "all"
116
- Requires-Dist: dataclasses; python_version == "3.6"
117
-
118
32
 
119
33
  <p align="center">
120
34
  <img height="150px" src="https://raw.githubusercontent.com/online-ml/deep-river/master/docs/img/logo.png" alt="incremental dl logo">
@@ -124,9 +38,11 @@ Requires-Dist: dataclasses; python_version == "3.6"
124
38
  <a href="https://codecov.io/gh/online-ml/deep-river" >
125
39
  <img src="https://codecov.io/gh/online-ml/deep-river/branch/master/graph/badge.svg?token=ZKUIISZAYA"/>
126
40
  </a>
41
+ <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/deep-river">
127
42
  <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/deep-river">
128
43
  <img alt="GitHub" src="https://img.shields.io/github/license/online-ml/deep-river">
129
44
  <a href="https://joss.theoj.org/papers/6a76784f55e8b041d71a7fa776eb386a"><img src="https://joss.theoj.org/papers/6a76784f55e8b041d71a7fa776eb386a/status.svg"></a>
45
+ <a href="https://doi.org/10.5281/zenodo.14601980"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.14601980.svg" alt="DOI"></a>
130
46
  </p>
131
47
  <p align="center">
132
48
  deep-river is a Python library for online deep learning.
@@ -135,7 +51,9 @@ Requires-Dist: dataclasses; python_version == "3.6"
135
51
  </p>
136
52
 
137
53
  ## 📚 [Documentation](https://online-ml.github.io/deep-river/)
138
- The [documentation](https://online-ml.github.io/deep-river/) contains an overview of all features of this repository as well as the repository's full features list. In each of these, the git repo reference is listed in a section that shows examples of the features and functionality.
54
+ The [documentation](https://online-ml.github.io/deep-river/) contains an overview of all features of this repository as well as the repository's full features list.
55
+ In each of these, the git repo reference is listed in a section that shows [examples](https://github.com/online-ml/deep-river/blob/master/docs/examples) of the features and functionality.
56
+ As we are always looking for further use cases and examples, feel free to contribute to the documentation or the repository itself via a pull request
139
57
 
140
58
  ## 💈 Installation
141
59
 
@@ -185,7 +103,7 @@ For further examples check out the <a href="https://online-ml.github.io/deep-riv
185
103
 
186
104
  >>> model_pipeline = compose.Pipeline(
187
105
  ... preprocessing.StandardScaler(),
188
- ... classification.Classifier(module=MyModule, loss_fn='binary_cross_entropy', optimizer_fn='adam')
106
+ ... classification.ClassifierInitialized(module=MyModule(10), loss_fn='binary_cross_entropy', optimizer_fn='adam')
189
107
  ... )
190
108
 
191
109
  >>> dataset = datasets.Phishing()
@@ -207,7 +125,7 @@ Accuracy: 0.7264
207
125
  >>> from river import stream
208
126
  >>> from sklearn import datasets
209
127
  >>> from torch import nn
210
- >>> from deep_river.regression.multioutput import MultiTargetRegressor
128
+ >>> from deep_river.regression.multioutput import MultiTargetRegressorInitialized
211
129
 
212
130
  >>> class MyModule(nn.Module):
213
131
  ... def __init__(self, n_features):
@@ -225,8 +143,8 @@ Accuracy: 0.7264
225
143
  ... )
226
144
  >>> model = compose.Pipeline(
227
145
  ... preprocessing.StandardScaler(),
228
- ... MultiTargetRegressor(
229
- ... module=MyModule,
146
+ ... MultiTargetRegressorInitialized(
147
+ ... module=MyModule(10),
230
148
  ... loss_fn='mse',
231
149
  ... lr=0.3,
232
150
  ... optimizer_fn='sgd',
@@ -241,7 +159,7 @@ MicroAverage(MAE): 34.31
241
159
  ### Anomaly Detection
242
160
 
243
161
  ```python
244
- >>> from deep_river.anomaly import Autoencoder
162
+ >>> from deep_river.anomaly import AutoencoderInitialized
245
163
  >>> from river import metrics
246
164
  >>> from river.datasets import CreditCard
247
165
  >>> from torch import nn
@@ -250,7 +168,7 @@ MicroAverage(MAE): 34.31
250
168
  >>> from river.preprocessing import MinMaxScaler
251
169
 
252
170
  >>> dataset = CreditCard().take(5000)
253
- >>> metric = metrics.ROCAUC(n_thresholds=50)
171
+ >>> metric = metrics.RollingROCAUC(window_size=5000)
254
172
 
255
173
  >>> class MyAutoEncoder(nn.Module):
256
174
  ... def __init__(self, n_features, latent_dim=3):
@@ -266,7 +184,7 @@ MicroAverage(MAE): 34.31
266
184
  ... X = self.linear2(X)
267
185
  ... return self.sigmoid(X)
268
186
 
269
- >>> ae = Autoencoder(module=MyAutoEncoder, lr=0.005)
187
+ >>> ae = AutoencoderInitialized(module=MyAutoEncoder(10), lr=0.005)
270
188
  >>> scaler = MinMaxScaler()
271
189
  >>> model = Pipeline(scaler, ae)
272
190
 
@@ -275,11 +193,31 @@ MicroAverage(MAE): 34.31
275
193
  ... model.learn_one(x=x)
276
194
  ... metric.update(y, score)
277
195
  ...
278
- >>> print(f"ROCAUC: {metric.get():.4f}")
279
- ROCAUC: 0.7812
196
+ >>> print(f"Rolling ROCAUC: {metric.get():.4f}")
197
+ Rolling ROCAUC: 0.8901
198
+
199
+ ```
280
200
 
201
+ ## 💬 Citation
202
+
203
+ To acknowledge the use of the `DeepRiver` library in your research, please refer to our [paper](https://joss.theoj.org/papers/10.21105/joss.07226) published on Journal of Open Source Software (JOSS):
204
+
205
+ ```bibtex
206
+ @article{Kulbach2025,
207
+ doi = {10.21105/joss.07226},
208
+ url = {https://doi.org/10.21105/joss.07226},
209
+ year = {2025},
210
+ publisher = {The Open Journal},
211
+ volume = {10},
212
+ number = {105},
213
+ pages = {7226},
214
+ author = {Cedric Kulbach and Lucas Cazzonelli and Hoang-Anh Ngo and Max Halford and Saulo Martiello Mastelini},
215
+ title = {DeepRiver: A Deep Learning Library for Data Streams},
216
+ journal = {Journal of Open Source Software}
217
+ }
281
218
  ```
282
219
 
220
+
283
221
  ## 🏫 Affiliations
284
222
 
285
223
  <p align="center">
@@ -289,3 +227,4 @@ ROCAUC: 0.7812
289
227
  <p align="center">
290
228
  <img src="https://lieferbotnet.de/wp-content/uploads/2022/09/LieferBotNet-Logo.png?raw=true" alt="Lieferbot net" height="200"/>
291
229
  </p>
230
+
@@ -6,9 +6,11 @@
6
6
  <a href="https://codecov.io/gh/online-ml/deep-river" >
7
7
  <img src="https://codecov.io/gh/online-ml/deep-river/branch/master/graph/badge.svg?token=ZKUIISZAYA"/>
8
8
  </a>
9
+ <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/deep-river">
9
10
  <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/deep-river">
10
11
  <img alt="GitHub" src="https://img.shields.io/github/license/online-ml/deep-river">
11
12
  <a href="https://joss.theoj.org/papers/6a76784f55e8b041d71a7fa776eb386a"><img src="https://joss.theoj.org/papers/6a76784f55e8b041d71a7fa776eb386a/status.svg"></a>
13
+ <a href="https://doi.org/10.5281/zenodo.14601980"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.14601980.svg" alt="DOI"></a>
12
14
  </p>
13
15
  <p align="center">
14
16
  deep-river is a Python library for online deep learning.
@@ -17,7 +19,9 @@
17
19
  </p>
18
20
 
19
21
  ## 📚 [Documentation](https://online-ml.github.io/deep-river/)
20
- The [documentation](https://online-ml.github.io/deep-river/) contains an overview of all features of this repository as well as the repository's full features list. In each of these, the git repo reference is listed in a section that shows examples of the features and functionality.
22
+ The [documentation](https://online-ml.github.io/deep-river/) contains an overview of all features of this repository as well as the repository's full features list.
23
+ In each of these, the git repo reference is listed in a section that shows [examples](https://github.com/online-ml/deep-river/blob/master/docs/examples) of the features and functionality.
24
+ As we are always looking for further use cases and examples, feel free to contribute to the documentation or the repository itself via a pull request
21
25
 
22
26
  ## 💈 Installation
23
27
 
@@ -67,7 +71,7 @@ For further examples check out the <a href="https://online-ml.github.io/deep-riv
67
71
 
68
72
  >>> model_pipeline = compose.Pipeline(
69
73
  ... preprocessing.StandardScaler(),
70
- ... classification.Classifier(module=MyModule, loss_fn='binary_cross_entropy', optimizer_fn='adam')
74
+ ... classification.ClassifierInitialized(module=MyModule(10), loss_fn='binary_cross_entropy', optimizer_fn='adam')
71
75
  ... )
72
76
 
73
77
  >>> dataset = datasets.Phishing()
@@ -89,7 +93,7 @@ Accuracy: 0.7264
89
93
  >>> from river import stream
90
94
  >>> from sklearn import datasets
91
95
  >>> from torch import nn
92
- >>> from deep_river.regression.multioutput import MultiTargetRegressor
96
+ >>> from deep_river.regression.multioutput import MultiTargetRegressorInitialized
93
97
 
94
98
  >>> class MyModule(nn.Module):
95
99
  ... def __init__(self, n_features):
@@ -107,8 +111,8 @@ Accuracy: 0.7264
107
111
  ... )
108
112
  >>> model = compose.Pipeline(
109
113
  ... preprocessing.StandardScaler(),
110
- ... MultiTargetRegressor(
111
- ... module=MyModule,
114
+ ... MultiTargetRegressorInitialized(
115
+ ... module=MyModule(10),
112
116
  ... loss_fn='mse',
113
117
  ... lr=0.3,
114
118
  ... optimizer_fn='sgd',
@@ -123,7 +127,7 @@ MicroAverage(MAE): 34.31
123
127
  ### Anomaly Detection
124
128
 
125
129
  ```python
126
- >>> from deep_river.anomaly import Autoencoder
130
+ >>> from deep_river.anomaly import AutoencoderInitialized
127
131
  >>> from river import metrics
128
132
  >>> from river.datasets import CreditCard
129
133
  >>> from torch import nn
@@ -132,7 +136,7 @@ MicroAverage(MAE): 34.31
132
136
  >>> from river.preprocessing import MinMaxScaler
133
137
 
134
138
  >>> dataset = CreditCard().take(5000)
135
- >>> metric = metrics.ROCAUC(n_thresholds=50)
139
+ >>> metric = metrics.RollingROCAUC(window_size=5000)
136
140
 
137
141
  >>> class MyAutoEncoder(nn.Module):
138
142
  ... def __init__(self, n_features, latent_dim=3):
@@ -148,7 +152,7 @@ MicroAverage(MAE): 34.31
148
152
  ... X = self.linear2(X)
149
153
  ... return self.sigmoid(X)
150
154
 
151
- >>> ae = Autoencoder(module=MyAutoEncoder, lr=0.005)
155
+ >>> ae = AutoencoderInitialized(module=MyAutoEncoder(10), lr=0.005)
152
156
  >>> scaler = MinMaxScaler()
153
157
  >>> model = Pipeline(scaler, ae)
154
158
 
@@ -157,11 +161,31 @@ MicroAverage(MAE): 34.31
157
161
  ... model.learn_one(x=x)
158
162
  ... metric.update(y, score)
159
163
  ...
160
- >>> print(f"ROCAUC: {metric.get():.4f}")
161
- ROCAUC: 0.7812
164
+ >>> print(f"Rolling ROCAUC: {metric.get():.4f}")
165
+ Rolling ROCAUC: 0.8901
162
166
 
163
167
  ```
164
168
 
169
+ ## 💬 Citation
170
+
171
+ To acknowledge the use of the `DeepRiver` library in your research, please refer to our [paper](https://joss.theoj.org/papers/10.21105/joss.07226) published on Journal of Open Source Software (JOSS):
172
+
173
+ ```bibtex
174
+ @article{Kulbach2025,
175
+ doi = {10.21105/joss.07226},
176
+ url = {https://doi.org/10.21105/joss.07226},
177
+ year = {2025},
178
+ publisher = {The Open Journal},
179
+ volume = {10},
180
+ number = {105},
181
+ pages = {7226},
182
+ author = {Cedric Kulbach and Lucas Cazzonelli and Hoang-Anh Ngo and Max Halford and Saulo Martiello Mastelini},
183
+ title = {DeepRiver: A Deep Learning Library for Data Streams},
184
+ journal = {Journal of Open Source Software}
185
+ }
186
+ ```
187
+
188
+
165
189
  ## 🏫 Affiliations
166
190
 
167
191
  <p align="center">
@@ -1,3 +1,3 @@
1
- VERSION = (0, 2, 7)
1
+ VERSION = (0, 3, 0)
2
2
 
3
3
  __version__ = ".".join(map(str, VERSION)) # noqa: F401
@@ -0,0 +1,23 @@
1
+ from .ae import Autoencoder, AutoencoderInitialized
2
+ from .probability_weighted_ae import (
3
+ ProbabilityWeightedAutoencoder,
4
+ ProbabilityWeightedAutoencoderInitialized,
5
+ )
6
+ from .rolling_ae import RollingAutoencoder, RollingAutoencoderInitialized
7
+ from .scaler import AnomalyMeanScaler, AnomalyMinMaxScaler, AnomalyStandardScaler
8
+
9
+ """
10
+ This module contains the anomaly detection algorithms for the
11
+ deep_river package.
12
+ """
13
+ __all__ = [
14
+ "Autoencoder",
15
+ "RollingAutoencoder",
16
+ "ProbabilityWeightedAutoencoder",
17
+ "AnomalyStandardScaler",
18
+ "AnomalyMeanScaler",
19
+ "AnomalyMinMaxScaler",
20
+ "AutoencoderInitialized",
21
+ "ProbabilityWeightedAutoencoderInitialized",
22
+ "RollingAutoencoderInitialized",
23
+ ]