Skip to content

Commit f41ae65

Browse files
authored
Merge pull request #27 from fhswf/updates
Refact: API cleanup - Export lists __all__
2 parents bab2bff + f964ae7 commit f41ae65

8 files changed

Lines changed: 77 additions & 15 deletions

File tree

.zenodo.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"title": "MLPro-Int-scikit-learn - Integration of scikit-learn into MLPro",
3+
"description": "This repository provides wrapper classes that enable the use of selected scikit-learn functionalities in your MLPro applications.",
4+
"creators": [
5+
{
6+
"name": "Arend, Detlef",
7+
"affiliation": "South Westphalia University of Applied Sciences, Germany",
8+
"orcid": "0000-0002-8315-2346"
9+
},
10+
{
11+
"name": "Yuwono, Steve",
12+
"affiliation": "South Westphalia University of Applied Sciences, Germany",
13+
"orcid": "0000-0001-7570-2726"
14+
},
15+
{
16+
"name": "Kumar, Syamraj Purushamparambil Satheesh",
17+
"affiliation": "South Westphalia University of Applied Sciences, Germany"
18+
}
19+
],
20+
"license": "Apache-2.0",
21+
"upload_type": "software",
22+
"keywords": [
23+
"online machine learning",
24+
"Python",
25+
"MLPro",
26+
"scikit-learn",
27+
"framework",
28+
"open source"
29+
],
30+
"communities": [
31+
{
32+
"identifier": "mlpro"
33+
}
34+
],
35+
"language": "eng",
36+
"access_right": "open"
37+
}

src/mlpro_int_sklearn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from mlpro_int_sklearn.wrappers import *
1+
from .wrappers import *
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from mlpro_int_sklearn.wrappers.basics import *
2-
from mlpro_int_sklearn.wrappers.streams import *
3-
from mlpro_int_sklearn.wrappers.anomalydetectors import *
1+
from .basics import *
2+
from .streams import *
3+
from .anomalydetectors import *
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from mlpro_int_sklearn.wrappers.anomalydetectors.basics import WrAnomalyDetectorSklearn2MLPro
1+
from .basics import *

src/mlpro_int_sklearn/wrappers/anomalydetectors/basics.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
## -- 2025-05-30 2.2.0 DA/DS Alignment with MLPro 2.0.2
2020
## -- 2025-06-12 2.3.0 DA/DS - Alignment with MLPro 2.0.2
2121
## -- - Rework and optimization
22+
## -- 2025-07-23 2.4.0 DA Refactoring
2223
## -------------------------------------------------------------------------------------------------
2324

2425
"""
25-
Ver. 2.3.0 (2025-06-12)
26+
Ver. 2.4.0 (2025-07-23)
2627
2728
This module provides wrapper root classes from Scikit-learn to MLPro, specifically for anomaly detectors.
2829
@@ -34,8 +35,7 @@
3435
import numpy as np
3536
from sklearn.base import OutlierMixin
3637

37-
from mlpro.bf.various import Log
38-
from mlpro.bf.exceptions import ParamError
38+
from mlpro.bf import Log, ParamError
3939
from mlpro.bf.streams import StreamTask, Instance
4040
from mlpro.oa.streams.tasks.changedetectors.anomalydetectors.instancebased import AnomalyDetectorIBPG
4141
from mlpro.oa.streams.tasks.changedetectors.anomalydetectors.anomalies.instancebased import PointAnomaly
@@ -44,6 +44,12 @@
4444

4545

4646

47+
# Export list for public API
48+
__all__ = [ 'WrAnomalyDetectorSklearn2MLPro' ]
49+
50+
51+
52+
4753
## -------------------------------------------------------------------------------------------------
4854
## -------------------------------------------------------------------------------------------------
4955
class WrAnomalyDetectorSklearn2MLPro (AnomalyDetectorIBPG, WrapperSklearn):

src/mlpro_int_sklearn/wrappers/basics.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
## -- 2024-02-16 1.0.0 DA First version
99
## -- 2024-04-18 1.1.0 DA Alignment ot MLPro 1.4.0
1010
## -- 2025-03-05 1.2.0 DA Update of minimum release of scikit-learn to 1.6.1
11+
## -- 2025-07-23 1.3.0 DA Refactoring
1112
## -------------------------------------------------------------------------------------------------
1213

1314
"""
14-
Ver. 1.2.0 (2025-03-05)
15+
Ver. 1.3.0 (2025-07-23)
1516
1617
This module contains the abstract root class for all scikit-learn wrapper classes.
1718
@@ -25,6 +26,11 @@
2526

2627

2728

29+
# Export list for public API
30+
__all__ = [ 'WrapperSklearn' ]
31+
32+
33+
2834

2935
## -------------------------------------------------------------------------------------------------
3036
## -------------------------------------------------------------------------------------------------

src/mlpro_int_sklearn/wrappers/streams.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
## -- 2022-12-13 1.3.2 DA Bugfix
1818
## -- 2023-06-09 1.4.0 DA Made the wrapper a sub-package
1919
## -- 2024-02-16 1.5.0 DA Refactoring
20+
## -- 2024-02-16 1.6.0 DA Refactoring
21+
## -- 2025-07-23 1.7.0 DA Refactoring
2022
## -------------------------------------------------------------------------------------------------
2123

2224
"""
23-
Ver. 1.5.0 (2024-02-16)
25+
Ver. 1.7.0 (2025-07-23)
2426
2527
This module provides wrapper functionalities to incorporate public data sets of the scikit-learn ecosystem.
2628
@@ -30,11 +32,20 @@
3032
"""
3133

3234

33-
from mlpro_int_sklearn.wrappers import WrapperSklearn
34-
from mlpro.bf.streams import *
35-
from mlpro.bf.math import *
36-
from sklearn import datasets as sklearn_datasets
3735
import numpy
36+
from sklearn import datasets as sklearn_datasets
37+
38+
from mlpro.bf import Log, Mode
39+
from mlpro.bf.various import ScientificObject
40+
from mlpro.bf.math import *
41+
from mlpro.bf.streams import *
42+
43+
from mlpro_int_sklearn.wrappers import WrapperSklearn
44+
45+
46+
47+
# Export list for public API
48+
__all__ = [ 'WrStreamProviderSklearn' ]
3849

3950

4051

test/howtos/bf/howto_bf_streams_001_accessing_data_from_scikitlearn.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
"""
3333

3434

35+
from datetime import datetime
36+
3537
from mlpro_int_sklearn import *
36-
from mlpro.bf.various import Log
38+
from mlpro.bf import Log
3739

3840

3941

0 commit comments

Comments
 (0)