dragon-ml-toolbox 11.1.1__tar.gz → 12.0.1__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.
Potentially problematic release.
This version of dragon-ml-toolbox might be problematic. Click here for more details.
- {dragon_ml_toolbox-11.1.1/dragon_ml_toolbox.egg-info → dragon_ml_toolbox-12.0.1}/PKG-INFO +22 -36
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/README.md +19 -27
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1/dragon_ml_toolbox.egg-info}/PKG-INFO +22 -36
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/dragon_ml_toolbox.egg-info/SOURCES.txt +3 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/dragon_ml_toolbox.egg-info/requires.txt +0 -8
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ETL_cleaning.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ETL_engineering.py +17 -5
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/GUI_tools.py +2 -1
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/MICE_imputation.py +5 -2
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_callbacks.py +3 -3
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_datasetmaster.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_evaluation.py +2 -1
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_evaluation_multi.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_inference.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_models.py +3 -1
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_optimization.py +2 -1
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_scaler.py +3 -0
- dragon_ml_toolbox-12.0.1/ml_tools/ML_utilities.py +219 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/PSO_optimization.py +5 -6
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/RNN_forecast.py +2 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/SQL.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/VIF_factor.py +2 -1
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/_logger.py +0 -2
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/custom_logger.py +1 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/data_exploration.py +16 -10
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ensemble_inference.py +5 -6
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ensemble_learning.py +3 -2
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/handle_excel.py +1 -0
- dragon_ml_toolbox-12.0.1/ml_tools/math_utilities.py +235 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/path_manager.py +2 -1
- dragon_ml_toolbox-12.0.1/ml_tools/serde.py +103 -0
- dragon_ml_toolbox-12.0.1/ml_tools/utilities.py +386 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/pyproject.toml +3 -15
- dragon_ml_toolbox-11.1.1/ml_tools/utilities.py +0 -820
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/LICENSE +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/LICENSE-THIRD-PARTY.md +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/dragon_ml_toolbox.egg-info/dependency_links.txt +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/dragon_ml_toolbox.egg-info/top_level.txt +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ML_trainer.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/__init__.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/_script_info.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/constants.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/ensemble_evaluation.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/keys.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/ml_tools/optimization_tools.py +0 -0
- {dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/setup.cfg +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dragon-ml-toolbox
|
|
3
|
-
Version:
|
|
3
|
+
Version: 12.0.1
|
|
4
4
|
Summary: A collection of tools for data science and machine learning projects.
|
|
5
|
-
Author-email: Karl Loza <luigiloza@gmail.com>
|
|
5
|
+
Author-email: "Karl L. Loza Vidaurre" <luigiloza@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/DrAg0n-BoRn/ML_tools
|
|
8
8
|
Project-URL: Changelog, https://github.com/DrAg0n-BoRn/ML_tools/blob/master/CHANGELOG.md
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
License-File: LICENSE-THIRD-PARTY.md
|
|
@@ -47,9 +47,6 @@ Requires-Dist: lightgbm<=4.5.0; extra == "mice"
|
|
|
47
47
|
Requires-Dist: shap; extra == "mice"
|
|
48
48
|
Requires-Dist: colorlog; extra == "mice"
|
|
49
49
|
Requires-Dist: pyarrow; extra == "mice"
|
|
50
|
-
Provides-Extra: pytorch
|
|
51
|
-
Requires-Dist: torch; extra == "pytorch"
|
|
52
|
-
Requires-Dist: torchvision; extra == "pytorch"
|
|
53
50
|
Provides-Extra: excel
|
|
54
51
|
Requires-Dist: pandas; extra == "excel"
|
|
55
52
|
Requires-Dist: openpyxl; extra == "excel"
|
|
@@ -68,9 +65,6 @@ Requires-Dist: lightgbm; extra == "gui-boost"
|
|
|
68
65
|
Provides-Extra: gui-torch
|
|
69
66
|
Requires-Dist: numpy; extra == "gui-torch"
|
|
70
67
|
Requires-Dist: FreeSimpleGUI>=5.2; extra == "gui-torch"
|
|
71
|
-
Provides-Extra: plot
|
|
72
|
-
Requires-Dist: matplotlib; extra == "plot"
|
|
73
|
-
Requires-Dist: seaborn; extra == "plot"
|
|
74
68
|
Provides-Extra: pyinstaller
|
|
75
69
|
Requires-Dist: pyinstaller; extra == "pyinstaller"
|
|
76
70
|
Provides-Extra: nuitka
|
|
@@ -90,7 +84,7 @@ A collection of Python utilities for data science and machine learning, structur
|
|
|
90
84
|
|
|
91
85
|
## Installation
|
|
92
86
|
|
|
93
|
-
**Python 3.
|
|
87
|
+
**Python 3.12**
|
|
94
88
|
|
|
95
89
|
### Via PyPI
|
|
96
90
|
|
|
@@ -100,22 +94,22 @@ Install the latest stable release from PyPI:
|
|
|
100
94
|
pip install dragon-ml-toolbox
|
|
101
95
|
```
|
|
102
96
|
|
|
103
|
-
### Via
|
|
97
|
+
### Via conda-forge
|
|
104
98
|
|
|
105
|
-
|
|
99
|
+
Install from the conda-forge channel:
|
|
106
100
|
|
|
107
101
|
```bash
|
|
108
|
-
|
|
109
|
-
cd ML_tools
|
|
110
|
-
pip install -e .
|
|
102
|
+
conda install -c conda-forge dragon-ml-toolbox
|
|
111
103
|
```
|
|
112
104
|
|
|
113
|
-
### Via
|
|
105
|
+
### Via GitHub (Editable)
|
|
114
106
|
|
|
115
|
-
|
|
107
|
+
Clone the repository and install in editable mode:
|
|
116
108
|
|
|
117
109
|
```bash
|
|
118
|
-
|
|
110
|
+
git clone https://github.com/DrAg0n-BoRn/ML_tools.git
|
|
111
|
+
cd ML_tools
|
|
112
|
+
pip install -e .
|
|
119
113
|
```
|
|
120
114
|
|
|
121
115
|
## Modular Installation
|
|
@@ -128,13 +122,7 @@ Installs a comprehensive set of tools for typical data science workflows, includ
|
|
|
128
122
|
pip install "dragon-ml-toolbox[ML]"
|
|
129
123
|
```
|
|
130
124
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```Bash
|
|
134
|
-
pip install "dragon-ml-toolbox[pytorch]"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
⚠️ To make use of GPU acceleration (highly recommended), follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
125
|
+
⚠️ PyTorch required, follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
138
126
|
|
|
139
127
|
#### Modules:
|
|
140
128
|
|
|
@@ -147,6 +135,7 @@ ensemble_inference
|
|
|
147
135
|
ensemble_learning
|
|
148
136
|
ETL_cleaning
|
|
149
137
|
ETL_engineering
|
|
138
|
+
math_utilities
|
|
150
139
|
ML_callbacks
|
|
151
140
|
ML_datasetmaster
|
|
152
141
|
ML_evaluation_multi
|
|
@@ -156,10 +145,12 @@ ML_models
|
|
|
156
145
|
ML_optimization
|
|
157
146
|
ML_scaler
|
|
158
147
|
ML_trainer
|
|
148
|
+
ML_utilities
|
|
159
149
|
optimization_tools
|
|
160
150
|
path_manager
|
|
161
151
|
PSO_optimization
|
|
162
152
|
RNN_forecast
|
|
153
|
+
serde
|
|
163
154
|
SQL
|
|
164
155
|
utilities
|
|
165
156
|
```
|
|
@@ -179,7 +170,9 @@ pip install "dragon-ml-toolbox[mice]"
|
|
|
179
170
|
```Bash
|
|
180
171
|
constants
|
|
181
172
|
custom_logger
|
|
173
|
+
math_utilities
|
|
182
174
|
MICE_imputation
|
|
175
|
+
serde
|
|
183
176
|
VIF_factor
|
|
184
177
|
path_manager
|
|
185
178
|
utilities
|
|
@@ -208,16 +201,12 @@ path_manager
|
|
|
208
201
|
|
|
209
202
|
### 🎰 GUI for Boosting Algorithms (XGBoost, LightGBM) [gui-boost]
|
|
210
203
|
|
|
211
|
-
|
|
204
|
+
GUI tools compatible with XGBoost and LightGBM models used for inference.
|
|
212
205
|
|
|
213
206
|
```Bash
|
|
214
207
|
pip install "dragon-ml-toolbox[gui-boost]"
|
|
215
208
|
```
|
|
216
209
|
|
|
217
|
-
```Bash
|
|
218
|
-
pip install "dragon-ml-toolbox[gui-boost,plot]"
|
|
219
|
-
```
|
|
220
|
-
|
|
221
210
|
#### Modules:
|
|
222
211
|
|
|
223
212
|
```Bash
|
|
@@ -226,22 +215,19 @@ custom_logger
|
|
|
226
215
|
GUI_tools
|
|
227
216
|
ensemble_inference
|
|
228
217
|
path_manager
|
|
218
|
+
serde
|
|
229
219
|
```
|
|
230
220
|
|
|
231
221
|
---
|
|
232
222
|
|
|
233
223
|
### 🤖 GUI for PyTorch Models [gui-torch]
|
|
234
224
|
|
|
235
|
-
|
|
225
|
+
GUI tools compatible with PyTorch models used for inference.
|
|
236
226
|
|
|
237
227
|
```Bash
|
|
238
228
|
pip install "dragon-ml-toolbox[gui-torch]"
|
|
239
229
|
```
|
|
240
230
|
|
|
241
|
-
```Bash
|
|
242
|
-
pip install "dragon-ml-toolbox[gui-torch,plot]"
|
|
243
|
-
```
|
|
244
|
-
|
|
245
231
|
#### Modules:
|
|
246
232
|
|
|
247
233
|
```Bash
|
|
@@ -273,6 +259,6 @@ pip install "dragon-ml-toolbox[nuitka]"
|
|
|
273
259
|
After installation, import modules like this:
|
|
274
260
|
|
|
275
261
|
```python
|
|
276
|
-
from ml_tools.
|
|
262
|
+
from ml_tools.serde import serialize_object, deserialize_object
|
|
277
263
|
from ml_tools import custom_logger
|
|
278
264
|
```
|
|
@@ -9,7 +9,7 @@ A collection of Python utilities for data science and machine learning, structur
|
|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
12
|
-
**Python 3.
|
|
12
|
+
**Python 3.12**
|
|
13
13
|
|
|
14
14
|
### Via PyPI
|
|
15
15
|
|
|
@@ -19,22 +19,22 @@ Install the latest stable release from PyPI:
|
|
|
19
19
|
pip install dragon-ml-toolbox
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
### Via
|
|
22
|
+
### Via conda-forge
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Install from the conda-forge channel:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
|
|
28
|
-
cd ML_tools
|
|
29
|
-
pip install -e .
|
|
27
|
+
conda install -c conda-forge dragon-ml-toolbox
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
### Via
|
|
30
|
+
### Via GitHub (Editable)
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
Clone the repository and install in editable mode:
|
|
35
33
|
|
|
36
34
|
```bash
|
|
37
|
-
|
|
35
|
+
git clone https://github.com/DrAg0n-BoRn/ML_tools.git
|
|
36
|
+
cd ML_tools
|
|
37
|
+
pip install -e .
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Modular Installation
|
|
@@ -47,13 +47,7 @@ Installs a comprehensive set of tools for typical data science workflows, includ
|
|
|
47
47
|
pip install "dragon-ml-toolbox[ML]"
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```Bash
|
|
53
|
-
pip install "dragon-ml-toolbox[pytorch]"
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
⚠️ To make use of GPU acceleration (highly recommended), follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
50
|
+
⚠️ PyTorch required, follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
57
51
|
|
|
58
52
|
#### Modules:
|
|
59
53
|
|
|
@@ -66,6 +60,7 @@ ensemble_inference
|
|
|
66
60
|
ensemble_learning
|
|
67
61
|
ETL_cleaning
|
|
68
62
|
ETL_engineering
|
|
63
|
+
math_utilities
|
|
69
64
|
ML_callbacks
|
|
70
65
|
ML_datasetmaster
|
|
71
66
|
ML_evaluation_multi
|
|
@@ -75,10 +70,12 @@ ML_models
|
|
|
75
70
|
ML_optimization
|
|
76
71
|
ML_scaler
|
|
77
72
|
ML_trainer
|
|
73
|
+
ML_utilities
|
|
78
74
|
optimization_tools
|
|
79
75
|
path_manager
|
|
80
76
|
PSO_optimization
|
|
81
77
|
RNN_forecast
|
|
78
|
+
serde
|
|
82
79
|
SQL
|
|
83
80
|
utilities
|
|
84
81
|
```
|
|
@@ -98,7 +95,9 @@ pip install "dragon-ml-toolbox[mice]"
|
|
|
98
95
|
```Bash
|
|
99
96
|
constants
|
|
100
97
|
custom_logger
|
|
98
|
+
math_utilities
|
|
101
99
|
MICE_imputation
|
|
100
|
+
serde
|
|
102
101
|
VIF_factor
|
|
103
102
|
path_manager
|
|
104
103
|
utilities
|
|
@@ -127,16 +126,12 @@ path_manager
|
|
|
127
126
|
|
|
128
127
|
### 🎰 GUI for Boosting Algorithms (XGBoost, LightGBM) [gui-boost]
|
|
129
128
|
|
|
130
|
-
|
|
129
|
+
GUI tools compatible with XGBoost and LightGBM models used for inference.
|
|
131
130
|
|
|
132
131
|
```Bash
|
|
133
132
|
pip install "dragon-ml-toolbox[gui-boost]"
|
|
134
133
|
```
|
|
135
134
|
|
|
136
|
-
```Bash
|
|
137
|
-
pip install "dragon-ml-toolbox[gui-boost,plot]"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
135
|
#### Modules:
|
|
141
136
|
|
|
142
137
|
```Bash
|
|
@@ -145,22 +140,19 @@ custom_logger
|
|
|
145
140
|
GUI_tools
|
|
146
141
|
ensemble_inference
|
|
147
142
|
path_manager
|
|
143
|
+
serde
|
|
148
144
|
```
|
|
149
145
|
|
|
150
146
|
---
|
|
151
147
|
|
|
152
148
|
### 🤖 GUI for PyTorch Models [gui-torch]
|
|
153
149
|
|
|
154
|
-
|
|
150
|
+
GUI tools compatible with PyTorch models used for inference.
|
|
155
151
|
|
|
156
152
|
```Bash
|
|
157
153
|
pip install "dragon-ml-toolbox[gui-torch]"
|
|
158
154
|
```
|
|
159
155
|
|
|
160
|
-
```Bash
|
|
161
|
-
pip install "dragon-ml-toolbox[gui-torch,plot]"
|
|
162
|
-
```
|
|
163
|
-
|
|
164
156
|
#### Modules:
|
|
165
157
|
|
|
166
158
|
```Bash
|
|
@@ -192,6 +184,6 @@ pip install "dragon-ml-toolbox[nuitka]"
|
|
|
192
184
|
After installation, import modules like this:
|
|
193
185
|
|
|
194
186
|
```python
|
|
195
|
-
from ml_tools.
|
|
187
|
+
from ml_tools.serde import serialize_object, deserialize_object
|
|
196
188
|
from ml_tools import custom_logger
|
|
197
189
|
```
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dragon-ml-toolbox
|
|
3
|
-
Version:
|
|
3
|
+
Version: 12.0.1
|
|
4
4
|
Summary: A collection of tools for data science and machine learning projects.
|
|
5
|
-
Author-email: Karl Loza <luigiloza@gmail.com>
|
|
5
|
+
Author-email: "Karl L. Loza Vidaurre" <luigiloza@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/DrAg0n-BoRn/ML_tools
|
|
8
8
|
Project-URL: Changelog, https://github.com/DrAg0n-BoRn/ML_tools/blob/master/CHANGELOG.md
|
|
9
9
|
Classifier: Programming Language :: Python :: 3
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
License-File: LICENSE-THIRD-PARTY.md
|
|
@@ -47,9 +47,6 @@ Requires-Dist: lightgbm<=4.5.0; extra == "mice"
|
|
|
47
47
|
Requires-Dist: shap; extra == "mice"
|
|
48
48
|
Requires-Dist: colorlog; extra == "mice"
|
|
49
49
|
Requires-Dist: pyarrow; extra == "mice"
|
|
50
|
-
Provides-Extra: pytorch
|
|
51
|
-
Requires-Dist: torch; extra == "pytorch"
|
|
52
|
-
Requires-Dist: torchvision; extra == "pytorch"
|
|
53
50
|
Provides-Extra: excel
|
|
54
51
|
Requires-Dist: pandas; extra == "excel"
|
|
55
52
|
Requires-Dist: openpyxl; extra == "excel"
|
|
@@ -68,9 +65,6 @@ Requires-Dist: lightgbm; extra == "gui-boost"
|
|
|
68
65
|
Provides-Extra: gui-torch
|
|
69
66
|
Requires-Dist: numpy; extra == "gui-torch"
|
|
70
67
|
Requires-Dist: FreeSimpleGUI>=5.2; extra == "gui-torch"
|
|
71
|
-
Provides-Extra: plot
|
|
72
|
-
Requires-Dist: matplotlib; extra == "plot"
|
|
73
|
-
Requires-Dist: seaborn; extra == "plot"
|
|
74
68
|
Provides-Extra: pyinstaller
|
|
75
69
|
Requires-Dist: pyinstaller; extra == "pyinstaller"
|
|
76
70
|
Provides-Extra: nuitka
|
|
@@ -90,7 +84,7 @@ A collection of Python utilities for data science and machine learning, structur
|
|
|
90
84
|
|
|
91
85
|
## Installation
|
|
92
86
|
|
|
93
|
-
**Python 3.
|
|
87
|
+
**Python 3.12**
|
|
94
88
|
|
|
95
89
|
### Via PyPI
|
|
96
90
|
|
|
@@ -100,22 +94,22 @@ Install the latest stable release from PyPI:
|
|
|
100
94
|
pip install dragon-ml-toolbox
|
|
101
95
|
```
|
|
102
96
|
|
|
103
|
-
### Via
|
|
97
|
+
### Via conda-forge
|
|
104
98
|
|
|
105
|
-
|
|
99
|
+
Install from the conda-forge channel:
|
|
106
100
|
|
|
107
101
|
```bash
|
|
108
|
-
|
|
109
|
-
cd ML_tools
|
|
110
|
-
pip install -e .
|
|
102
|
+
conda install -c conda-forge dragon-ml-toolbox
|
|
111
103
|
```
|
|
112
104
|
|
|
113
|
-
### Via
|
|
105
|
+
### Via GitHub (Editable)
|
|
114
106
|
|
|
115
|
-
|
|
107
|
+
Clone the repository and install in editable mode:
|
|
116
108
|
|
|
117
109
|
```bash
|
|
118
|
-
|
|
110
|
+
git clone https://github.com/DrAg0n-BoRn/ML_tools.git
|
|
111
|
+
cd ML_tools
|
|
112
|
+
pip install -e .
|
|
119
113
|
```
|
|
120
114
|
|
|
121
115
|
## Modular Installation
|
|
@@ -128,13 +122,7 @@ Installs a comprehensive set of tools for typical data science workflows, includ
|
|
|
128
122
|
pip install "dragon-ml-toolbox[ML]"
|
|
129
123
|
```
|
|
130
124
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```Bash
|
|
134
|
-
pip install "dragon-ml-toolbox[pytorch]"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
⚠️ To make use of GPU acceleration (highly recommended), follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
125
|
+
⚠️ PyTorch required, follow the official instructions: [PyTorch website](https://pytorch.org/get-started/locally/)
|
|
138
126
|
|
|
139
127
|
#### Modules:
|
|
140
128
|
|
|
@@ -147,6 +135,7 @@ ensemble_inference
|
|
|
147
135
|
ensemble_learning
|
|
148
136
|
ETL_cleaning
|
|
149
137
|
ETL_engineering
|
|
138
|
+
math_utilities
|
|
150
139
|
ML_callbacks
|
|
151
140
|
ML_datasetmaster
|
|
152
141
|
ML_evaluation_multi
|
|
@@ -156,10 +145,12 @@ ML_models
|
|
|
156
145
|
ML_optimization
|
|
157
146
|
ML_scaler
|
|
158
147
|
ML_trainer
|
|
148
|
+
ML_utilities
|
|
159
149
|
optimization_tools
|
|
160
150
|
path_manager
|
|
161
151
|
PSO_optimization
|
|
162
152
|
RNN_forecast
|
|
153
|
+
serde
|
|
163
154
|
SQL
|
|
164
155
|
utilities
|
|
165
156
|
```
|
|
@@ -179,7 +170,9 @@ pip install "dragon-ml-toolbox[mice]"
|
|
|
179
170
|
```Bash
|
|
180
171
|
constants
|
|
181
172
|
custom_logger
|
|
173
|
+
math_utilities
|
|
182
174
|
MICE_imputation
|
|
175
|
+
serde
|
|
183
176
|
VIF_factor
|
|
184
177
|
path_manager
|
|
185
178
|
utilities
|
|
@@ -208,16 +201,12 @@ path_manager
|
|
|
208
201
|
|
|
209
202
|
### 🎰 GUI for Boosting Algorithms (XGBoost, LightGBM) [gui-boost]
|
|
210
203
|
|
|
211
|
-
|
|
204
|
+
GUI tools compatible with XGBoost and LightGBM models used for inference.
|
|
212
205
|
|
|
213
206
|
```Bash
|
|
214
207
|
pip install "dragon-ml-toolbox[gui-boost]"
|
|
215
208
|
```
|
|
216
209
|
|
|
217
|
-
```Bash
|
|
218
|
-
pip install "dragon-ml-toolbox[gui-boost,plot]"
|
|
219
|
-
```
|
|
220
|
-
|
|
221
210
|
#### Modules:
|
|
222
211
|
|
|
223
212
|
```Bash
|
|
@@ -226,22 +215,19 @@ custom_logger
|
|
|
226
215
|
GUI_tools
|
|
227
216
|
ensemble_inference
|
|
228
217
|
path_manager
|
|
218
|
+
serde
|
|
229
219
|
```
|
|
230
220
|
|
|
231
221
|
---
|
|
232
222
|
|
|
233
223
|
### 🤖 GUI for PyTorch Models [gui-torch]
|
|
234
224
|
|
|
235
|
-
|
|
225
|
+
GUI tools compatible with PyTorch models used for inference.
|
|
236
226
|
|
|
237
227
|
```Bash
|
|
238
228
|
pip install "dragon-ml-toolbox[gui-torch]"
|
|
239
229
|
```
|
|
240
230
|
|
|
241
|
-
```Bash
|
|
242
|
-
pip install "dragon-ml-toolbox[gui-torch,plot]"
|
|
243
|
-
```
|
|
244
|
-
|
|
245
231
|
#### Modules:
|
|
246
232
|
|
|
247
233
|
```Bash
|
|
@@ -273,6 +259,6 @@ pip install "dragon-ml-toolbox[nuitka]"
|
|
|
273
259
|
After installation, import modules like this:
|
|
274
260
|
|
|
275
261
|
```python
|
|
276
|
-
from ml_tools.
|
|
262
|
+
from ml_tools.serde import serialize_object, deserialize_object
|
|
277
263
|
from ml_tools import custom_logger
|
|
278
264
|
```
|
{dragon_ml_toolbox-11.1.1 → dragon_ml_toolbox-12.0.1}/dragon_ml_toolbox.egg-info/SOURCES.txt
RENAMED
|
@@ -20,6 +20,7 @@ ml_tools/ML_models.py
|
|
|
20
20
|
ml_tools/ML_optimization.py
|
|
21
21
|
ml_tools/ML_scaler.py
|
|
22
22
|
ml_tools/ML_trainer.py
|
|
23
|
+
ml_tools/ML_utilities.py
|
|
23
24
|
ml_tools/PSO_optimization.py
|
|
24
25
|
ml_tools/RNN_forecast.py
|
|
25
26
|
ml_tools/SQL.py
|
|
@@ -35,6 +36,8 @@ ml_tools/ensemble_inference.py
|
|
|
35
36
|
ml_tools/ensemble_learning.py
|
|
36
37
|
ml_tools/handle_excel.py
|
|
37
38
|
ml_tools/keys.py
|
|
39
|
+
ml_tools/math_utilities.py
|
|
38
40
|
ml_tools/optimization_tools.py
|
|
39
41
|
ml_tools/path_manager.py
|
|
42
|
+
ml_tools/serde.py
|
|
40
43
|
ml_tools/utilities.py
|
|
@@ -2,6 +2,7 @@ import polars as pl
|
|
|
2
2
|
import re
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Literal, Union, Optional, Any, Callable, List, Dict, Tuple
|
|
5
|
+
|
|
5
6
|
from .utilities import load_dataframe, save_dataframe
|
|
6
7
|
from .path_manager import make_fullpath
|
|
7
8
|
from ._script_info import _script_info
|
|
@@ -370,8 +371,20 @@ class AutoDummifier:
|
|
|
370
371
|
Column names are auto-generated by Polars as
|
|
371
372
|
'{original_col_name}_{category_value}'.
|
|
372
373
|
"""
|
|
373
|
-
#
|
|
374
|
-
|
|
374
|
+
# Store the original column name to construct the potential null column name
|
|
375
|
+
col_name = column.name
|
|
376
|
+
|
|
377
|
+
# Create the dummy variables from the series
|
|
378
|
+
dummies = column.cast(pl.Utf8).to_dummies(drop_first=self.drop_first)
|
|
379
|
+
|
|
380
|
+
# Define the name of the column that Polars creates for null values
|
|
381
|
+
null_col_name = f"{col_name}_null"
|
|
382
|
+
|
|
383
|
+
# Check if the null column exists and drop it if it does
|
|
384
|
+
if null_col_name in dummies.columns:
|
|
385
|
+
return dummies.drop(null_col_name)
|
|
386
|
+
|
|
387
|
+
return dummies
|
|
375
388
|
|
|
376
389
|
|
|
377
390
|
class MultiBinaryDummifier:
|
|
@@ -388,7 +401,7 @@ class MultiBinaryDummifier:
|
|
|
388
401
|
A list of strings, where each string is a keyword to search for. A separate
|
|
389
402
|
binary column will be created for each keyword.
|
|
390
403
|
case_insensitive (bool):
|
|
391
|
-
If True, keyword matching ignores case.
|
|
404
|
+
If True, keyword matching ignores case.
|
|
392
405
|
"""
|
|
393
406
|
def __init__(self, keywords: List[str], case_insensitive: bool = True):
|
|
394
407
|
if not isinstance(keywords, list) or not all(isinstance(k, str) for k in keywords):
|
|
@@ -944,8 +957,7 @@ class RatioCalculator:
|
|
|
944
957
|
|
|
945
958
|
class TriRatioCalculator:
|
|
946
959
|
"""
|
|
947
|
-
A transformer that handles three-part ("A:B:C")
|
|
948
|
-
ratios, enforcing a strict output structure.
|
|
960
|
+
A transformer that handles three-part ("A:B:C") ratios, enforcing a strict output structure.
|
|
949
961
|
|
|
950
962
|
- Three-part ratios produce A/B and A/C.
|
|
951
963
|
- Two-part ratios are assumed to be A:C and produce None for A/B.
|
|
@@ -4,8 +4,9 @@ import traceback
|
|
|
4
4
|
import FreeSimpleGUI as sg
|
|
5
5
|
from functools import wraps
|
|
6
6
|
from typing import Any, Dict, Tuple, List, Literal, Union, Optional, Callable
|
|
7
|
-
from ._script_info import _script_info
|
|
8
7
|
import numpy as np
|
|
8
|
+
|
|
9
|
+
from ._script_info import _script_info
|
|
9
10
|
from ._logger import _LOGGER
|
|
10
11
|
from .keys import _OneHotOtherPlaceholder
|
|
11
12
|
|
|
@@ -3,13 +3,16 @@ import miceforest as mf
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
import matplotlib.pyplot as plt
|
|
5
5
|
import numpy as np
|
|
6
|
-
from .utilities import load_dataframe, merge_dataframes, save_dataframe, threshold_binary_values
|
|
7
|
-
from .path_manager import sanitize_filename, make_fullpath, list_csv_paths
|
|
8
6
|
from plotnine import ggplot, labs, theme, element_blank # type: ignore
|
|
9
7
|
from typing import Optional, Union
|
|
8
|
+
|
|
9
|
+
from .utilities import load_dataframe, merge_dataframes, save_dataframe
|
|
10
|
+
from .math_utilities import threshold_binary_values
|
|
11
|
+
from .path_manager import sanitize_filename, make_fullpath, list_csv_paths
|
|
10
12
|
from ._logger import _LOGGER
|
|
11
13
|
from ._script_info import _script_info
|
|
12
14
|
|
|
15
|
+
|
|
13
16
|
__all__ = [
|
|
14
17
|
"apply_mice",
|
|
15
18
|
"save_imputed_datasets",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import torch
|
|
3
3
|
from tqdm.auto import tqdm
|
|
4
|
+
from typing import Union, Literal, Optional
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
4
7
|
from .path_manager import make_fullpath, sanitize_filename
|
|
5
8
|
from .keys import PyTorchLogKeys
|
|
6
9
|
from ._logger import _LOGGER
|
|
7
|
-
from typing import Optional
|
|
8
10
|
from ._script_info import _script_info
|
|
9
|
-
from typing import Union, Literal
|
|
10
|
-
from pathlib import Path
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
@@ -10,6 +10,7 @@ from torchvision.datasets import ImageFolder
|
|
|
10
10
|
from torchvision import transforms
|
|
11
11
|
import matplotlib.pyplot as plt
|
|
12
12
|
from pathlib import Path
|
|
13
|
+
|
|
13
14
|
from .path_manager import make_fullpath, sanitize_filename
|
|
14
15
|
from ._logger import _LOGGER
|
|
15
16
|
from ._script_info import _script_info
|
|
@@ -18,9 +18,10 @@ from sklearn.metrics import (
|
|
|
18
18
|
import torch
|
|
19
19
|
import shap
|
|
20
20
|
from pathlib import Path
|
|
21
|
+
from typing import Union, Optional, List
|
|
22
|
+
|
|
21
23
|
from .path_manager import make_fullpath
|
|
22
24
|
from ._logger import _LOGGER
|
|
23
|
-
from typing import Union, Optional, List
|
|
24
25
|
from ._script_info import _script_info
|
|
25
26
|
from .keys import SHAPKeys
|
|
26
27
|
|
|
@@ -3,6 +3,7 @@ from torch import nn
|
|
|
3
3
|
from typing import List, Union, Tuple, Dict, Any
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
import json
|
|
6
|
+
|
|
6
7
|
from ._logger import _LOGGER
|
|
7
8
|
from .path_manager import make_fullpath
|
|
8
9
|
from ._script_info import _script_info
|
|
@@ -155,6 +156,7 @@ class _BaseAttention(_BaseMLP):
|
|
|
155
156
|
def __init__(self, *args, **kwargs):
|
|
156
157
|
super().__init__(*args, **kwargs)
|
|
157
158
|
# By default, models inheriting this do not have the flag.
|
|
159
|
+
self.attention = None
|
|
158
160
|
self.has_interpretable_attention = False
|
|
159
161
|
|
|
160
162
|
def forward(self, x: torch.Tensor) -> torch.Tensor:
|
|
@@ -165,7 +167,7 @@ class _BaseAttention(_BaseMLP):
|
|
|
165
167
|
def forward_attention(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]:
|
|
166
168
|
"""Returns logits and attention weights."""
|
|
167
169
|
# This logic is now shared and defined in one place
|
|
168
|
-
x, attention_weights = self.attention(x)
|
|
170
|
+
x, attention_weights = self.attention(x) # type: ignore
|
|
169
171
|
x = self.mlp(x)
|
|
170
172
|
logits = self.output_layer(x)
|
|
171
173
|
return logits, attention_weights
|