opengood.py-ml-plot 2.3.0__tar.gz → 2.5.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.
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/LICENSE +1 -1
- {opengood_py_ml_plot-2.3.0/src/opengood.py_ml_plot.egg-info → opengood_py_ml_plot-2.5.0}/PKG-INFO +64 -35
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/README.md +52 -27
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/pyproject.toml +17 -9
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0/src/opengood.py_ml_plot.egg-info}/PKG-INFO +64 -35
- opengood_py_ml_plot-2.5.0/src/opengood.py_ml_plot.egg-info/requires.txt +9 -0
- opengood_py_ml_plot-2.3.0/src/opengood.py_ml_plot.egg-info/requires.txt +0 -4
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/setup.cfg +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood/__init__.py +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood/py_ml_plot/__init__.py +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood/py_ml_plot/classification_plot.py +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood.py_ml_plot.egg-info/SOURCES.txt +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood.py_ml_plot.egg-info/dependency_links.txt +0 -0
- {opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood.py_ml_plot.egg-info/top_level.txt +0 -0
{opengood_py_ml_plot-2.3.0/src/opengood.py_ml_plot.egg-info → opengood_py_ml_plot-2.5.0}/PKG-INFO
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opengood.py_ml_plot
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: Modules containing reusable functions for machine learning visualization plotting
|
|
5
5
|
Author-email: OpenGood <ai@opengood.ai>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
|
-
Copyright (c) 2025 OpenGood
|
|
8
|
+
Copyright (c) 2025-2026 OpenGood
|
|
9
9
|
|
|
10
10
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
11
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -25,30 +25,34 @@ License: MIT License
|
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
|
|
28
|
-
Project-URL: Homepage, https://github.com/opengood-
|
|
29
|
-
Project-URL: Documentation, https://github.com/opengood-
|
|
28
|
+
Project-URL: Homepage, https://github.com/opengood-ai/py-ml-plot
|
|
29
|
+
Project-URL: Documentation, https://github.com/opengood-ai/py-ml-plot
|
|
30
30
|
Classifier: Programming Language :: Python :: 3
|
|
31
31
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
32
|
Classifier: Operating System :: OS Independent
|
|
33
33
|
Requires-Python: >=3.12
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
|
-
Requires-Dist: matplotlib>=3.10.
|
|
37
|
-
Requires-Dist: numpy>=2.3
|
|
38
|
-
Requires-Dist: pandas>=
|
|
39
|
-
Requires-Dist: scikit-learn>=1.
|
|
36
|
+
Requires-Dist: matplotlib>=3.10.8
|
|
37
|
+
Requires-Dist: numpy>=2.4.3
|
|
38
|
+
Requires-Dist: pandas>=3.0.1
|
|
39
|
+
Requires-Dist: scikit-learn>=1.8.0
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: pip-tools>=7.5.3; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest>=9.0.2; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
40
44
|
Dynamic: license-file
|
|
41
45
|
|
|
42
46
|
# Python Machine Learning (ML) Plot
|
|
43
47
|
|
|
44
|
-
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Abuild)
|
|
49
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Arelease)
|
|
50
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions/workflows/codeql.yml)
|
|
51
|
+
[](https://codecov.io/gh/opengood-ai/py-ml-plot)
|
|
52
|
+
[](https://github.com/opengood-ai/py-ml-plot/releases/latest)
|
|
49
53
|
[](https://pypi.org/project/opengood.py-ml-plot/)
|
|
50
54
|

|
|
51
|
-
[](https://raw.githubusercontent.com/opengood-
|
|
55
|
+
[](https://raw.githubusercontent.com/opengood-ai/py-ml-plot/master/LICENSE)
|
|
52
56
|
|
|
53
57
|
Modules containing reusable functions for machine learning visualization
|
|
54
58
|
plotting
|
|
@@ -139,7 +143,7 @@ plt.show()
|
|
|
139
143
|
|
|
140
144
|
##### Output
|
|
141
145
|
|
|
142
|
-

|
|
143
147
|
|
|
144
148
|
---
|
|
145
149
|
|
|
@@ -150,8 +154,8 @@ plt.show()
|
|
|
150
154
|
`feature_scale` lambda implementation logic for function
|
|
151
155
|
`setup_classification_plot` is as follows:
|
|
152
156
|
|
|
153
|
-
* Inverse feature scaling is invoked via a
|
|
154
|
-
the `
|
|
157
|
+
* Inverse feature scaling is invoked via a feature scaling object, such as
|
|
158
|
+
the `StandardScaler` object `sc` created earlier for feature scaling
|
|
155
159
|
* `x_set` and `y_set` are assigned non-feature scaled values of the matrix of
|
|
156
160
|
features and the dependent variable
|
|
157
161
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
@@ -181,19 +185,22 @@ is as follows:
|
|
|
181
185
|
Visualization implementation logic for function `setup_classification_plot` is
|
|
182
186
|
as follows:
|
|
183
187
|
|
|
184
|
-
* `
|
|
185
|
-
|
|
188
|
+
* If the `meshgrid` dict is not defined, a default set of dict attributes are
|
|
189
|
+
set providing min, max, and step values for each axis:
|
|
190
|
+
* `0` and `1` are used for the keys
|
|
191
|
+
* `10` and `1000` are used for `min` and `max` values
|
|
192
|
+
* `0.25` is used for `step` value
|
|
193
|
+
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
194
|
+
assigned the values of `x` and `y`, respectively
|
|
186
195
|
* If the `feature_scale` lambda is defined, `x_set` and `y_set` are
|
|
187
196
|
assigned non-feature scaled values of the matrix of features and the dependent
|
|
188
197
|
variable from the sets using a feature scaling object, such as the
|
|
189
|
-
`
|
|
198
|
+
`StandardScaler` object created earlier for feature scaling
|
|
190
199
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
191
200
|
* `y_set` values are not inverted and taken directly from `y`
|
|
192
|
-
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
193
|
-
assigned the values of `x` and `y`, respectively
|
|
194
201
|
* `meshgrid` function from the NumPy library returns a tuple of coordinate
|
|
195
|
-
matrices from coordinate vectors
|
|
196
|
-
the `meshgrid` dict parameter
|
|
202
|
+
matrices from coordinate vectors
|
|
203
|
+
* The ranges for each axis are controlled by the `meshgrid` dict parameter
|
|
197
204
|
* Two sets of matrices (`x1` and `x2`) are returned with coordinate vectors
|
|
198
205
|
* `x1`
|
|
199
206
|
* `arange` function is called with a defined start and stop interval
|
|
@@ -225,7 +232,7 @@ as follows:
|
|
|
225
232
|
* `step` parameter
|
|
226
233
|
* Spacing between values
|
|
227
234
|
* Value of `0.25` is added for spacing
|
|
228
|
-
* The prediction logic implemented in the `
|
|
235
|
+
* The prediction logic implemented in the `predict` lambda is executed, and
|
|
229
236
|
the result is assigned to `y_pred`, containing the predictions
|
|
230
237
|
* `contourf` function from the Matplotlib library is used for creating filled
|
|
231
238
|
contour plots
|
|
@@ -302,32 +309,54 @@ as follows:
|
|
|
302
309
|
|
|
303
310
|
## Python Virtual Environment
|
|
304
311
|
|
|
305
|
-
Create Python virtual environment:
|
|
312
|
+
Create and activate Python virtual environment:
|
|
306
313
|
|
|
307
314
|
```bash
|
|
308
|
-
|
|
309
|
-
python3 -m venv ~/workspace/opengood-aio/py-ml-plot/.venv
|
|
315
|
+
python3 -m venv .venv
|
|
310
316
|
source .venv/bin/activate
|
|
311
317
|
```
|
|
312
318
|
|
|
313
|
-
## Install
|
|
319
|
+
## Install Dependencies
|
|
320
|
+
|
|
321
|
+
Install the package in editable mode with all dependencies:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
python3 -m pip install -e .
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Install with development dependencies (includes `pip-tools`, `pytest`, `pytest-cov`):
|
|
314
328
|
|
|
315
329
|
```bash
|
|
316
|
-
python3 -m pip install
|
|
317
|
-
python3 -m pip install numpy
|
|
318
|
-
python3 -m pip install pandas
|
|
319
|
-
python3 -m pip install scikit-learn
|
|
330
|
+
python3 -m pip install -e ".[dev]"
|
|
320
331
|
```
|
|
321
332
|
|
|
322
|
-
##
|
|
333
|
+
## Generate Requirements File
|
|
334
|
+
|
|
335
|
+
Generate a pinned `requirements.txt` file from pyproject.toml:
|
|
323
336
|
|
|
324
337
|
```bash
|
|
325
|
-
pip
|
|
338
|
+
pip-compile pyproject.toml -o requirements.txt
|
|
326
339
|
```
|
|
327
340
|
|
|
341
|
+
This creates a `requirements.txt` with exact versions of all dependencies and their transitive dependencies.
|
|
342
|
+
|
|
328
343
|
## Run Tests
|
|
329
344
|
|
|
345
|
+
Run all tests with coverage:
|
|
346
|
+
|
|
330
347
|
```bash
|
|
331
348
|
python -m pytest tests/
|
|
332
349
|
```
|
|
333
350
|
|
|
351
|
+
Run tests with verbose output and coverage report:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
python -m pytest tests/ -v --cov=src.opengood.py_ml_plot --cov-report=term-missing
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Run a specific test:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
python -m pytest tests/py_ml_plot/test_classification_plot.py::TestClassificationPlot::test_logistic_regression_setup_classification_plot_with_shaded_regions
|
|
361
|
+
```
|
|
362
|
+
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Python Machine Learning (ML) Plot
|
|
2
2
|
|
|
3
|
-
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Abuild)
|
|
4
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Arelease)
|
|
5
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions/workflows/codeql.yml)
|
|
6
|
+
[](https://codecov.io/gh/opengood-ai/py-ml-plot)
|
|
7
|
+
[](https://github.com/opengood-ai/py-ml-plot/releases/latest)
|
|
8
8
|
[](https://pypi.org/project/opengood.py-ml-plot/)
|
|
9
9
|

|
|
10
|
-
[](https://raw.githubusercontent.com/opengood-
|
|
10
|
+
[](https://raw.githubusercontent.com/opengood-ai/py-ml-plot/master/LICENSE)
|
|
11
11
|
|
|
12
12
|
Modules containing reusable functions for machine learning visualization
|
|
13
13
|
plotting
|
|
@@ -98,7 +98,7 @@ plt.show()
|
|
|
98
98
|
|
|
99
99
|
##### Output
|
|
100
100
|
|
|
101
|
-

|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
|
@@ -109,8 +109,8 @@ plt.show()
|
|
|
109
109
|
`feature_scale` lambda implementation logic for function
|
|
110
110
|
`setup_classification_plot` is as follows:
|
|
111
111
|
|
|
112
|
-
* Inverse feature scaling is invoked via a
|
|
113
|
-
the `
|
|
112
|
+
* Inverse feature scaling is invoked via a feature scaling object, such as
|
|
113
|
+
the `StandardScaler` object `sc` created earlier for feature scaling
|
|
114
114
|
* `x_set` and `y_set` are assigned non-feature scaled values of the matrix of
|
|
115
115
|
features and the dependent variable
|
|
116
116
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
@@ -140,19 +140,22 @@ is as follows:
|
|
|
140
140
|
Visualization implementation logic for function `setup_classification_plot` is
|
|
141
141
|
as follows:
|
|
142
142
|
|
|
143
|
-
* `
|
|
144
|
-
|
|
143
|
+
* If the `meshgrid` dict is not defined, a default set of dict attributes are
|
|
144
|
+
set providing min, max, and step values for each axis:
|
|
145
|
+
* `0` and `1` are used for the keys
|
|
146
|
+
* `10` and `1000` are used for `min` and `max` values
|
|
147
|
+
* `0.25` is used for `step` value
|
|
148
|
+
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
149
|
+
assigned the values of `x` and `y`, respectively
|
|
145
150
|
* If the `feature_scale` lambda is defined, `x_set` and `y_set` are
|
|
146
151
|
assigned non-feature scaled values of the matrix of features and the dependent
|
|
147
152
|
variable from the sets using a feature scaling object, such as the
|
|
148
|
-
`
|
|
153
|
+
`StandardScaler` object created earlier for feature scaling
|
|
149
154
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
150
155
|
* `y_set` values are not inverted and taken directly from `y`
|
|
151
|
-
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
152
|
-
assigned the values of `x` and `y`, respectively
|
|
153
156
|
* `meshgrid` function from the NumPy library returns a tuple of coordinate
|
|
154
|
-
matrices from coordinate vectors
|
|
155
|
-
the `meshgrid` dict parameter
|
|
157
|
+
matrices from coordinate vectors
|
|
158
|
+
* The ranges for each axis are controlled by the `meshgrid` dict parameter
|
|
156
159
|
* Two sets of matrices (`x1` and `x2`) are returned with coordinate vectors
|
|
157
160
|
* `x1`
|
|
158
161
|
* `arange` function is called with a defined start and stop interval
|
|
@@ -184,7 +187,7 @@ as follows:
|
|
|
184
187
|
* `step` parameter
|
|
185
188
|
* Spacing between values
|
|
186
189
|
* Value of `0.25` is added for spacing
|
|
187
|
-
* The prediction logic implemented in the `
|
|
190
|
+
* The prediction logic implemented in the `predict` lambda is executed, and
|
|
188
191
|
the result is assigned to `y_pred`, containing the predictions
|
|
189
192
|
* `contourf` function from the Matplotlib library is used for creating filled
|
|
190
193
|
contour plots
|
|
@@ -261,32 +264,54 @@ as follows:
|
|
|
261
264
|
|
|
262
265
|
## Python Virtual Environment
|
|
263
266
|
|
|
264
|
-
Create Python virtual environment:
|
|
267
|
+
Create and activate Python virtual environment:
|
|
265
268
|
|
|
266
269
|
```bash
|
|
267
|
-
|
|
268
|
-
python3 -m venv ~/workspace/opengood-aio/py-ml-plot/.venv
|
|
270
|
+
python3 -m venv .venv
|
|
269
271
|
source .venv/bin/activate
|
|
270
272
|
```
|
|
271
273
|
|
|
272
|
-
## Install
|
|
274
|
+
## Install Dependencies
|
|
275
|
+
|
|
276
|
+
Install the package in editable mode with all dependencies:
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
python3 -m pip install -e .
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Install with development dependencies (includes `pip-tools`, `pytest`, `pytest-cov`):
|
|
273
283
|
|
|
274
284
|
```bash
|
|
275
|
-
python3 -m pip install
|
|
276
|
-
python3 -m pip install numpy
|
|
277
|
-
python3 -m pip install pandas
|
|
278
|
-
python3 -m pip install scikit-learn
|
|
285
|
+
python3 -m pip install -e ".[dev]"
|
|
279
286
|
```
|
|
280
287
|
|
|
281
|
-
##
|
|
288
|
+
## Generate Requirements File
|
|
289
|
+
|
|
290
|
+
Generate a pinned `requirements.txt` file from pyproject.toml:
|
|
282
291
|
|
|
283
292
|
```bash
|
|
284
|
-
pip
|
|
293
|
+
pip-compile pyproject.toml -o requirements.txt
|
|
285
294
|
```
|
|
286
295
|
|
|
296
|
+
This creates a `requirements.txt` with exact versions of all dependencies and their transitive dependencies.
|
|
297
|
+
|
|
287
298
|
## Run Tests
|
|
288
299
|
|
|
300
|
+
Run all tests with coverage:
|
|
301
|
+
|
|
289
302
|
```bash
|
|
290
303
|
python -m pytest tests/
|
|
291
304
|
```
|
|
292
305
|
|
|
306
|
+
Run tests with verbose output and coverage report:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
python -m pytest tests/ -v --cov=src.opengood.py_ml_plot --cov-report=term-missing
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Run a specific test:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
python -m pytest tests/py_ml_plot/test_classification_plot.py::TestClassificationPlot::test_logistic_regression_setup_classification_plot_with_shaded_regions
|
|
316
|
+
```
|
|
317
|
+
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools >=
|
|
2
|
+
requires = ["setuptools >= 82.0.1", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "opengood.py_ml_plot"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.5.0"
|
|
8
8
|
description = "Modules containing reusable functions for machine learning visualization plotting"
|
|
9
9
|
authors = [
|
|
10
10
|
{ name = "OpenGood", email = "ai@opengood.ai" }
|
|
@@ -19,18 +19,26 @@ readme = "README.md"
|
|
|
19
19
|
license = { file = "LICENSE" }
|
|
20
20
|
|
|
21
21
|
dependencies = [
|
|
22
|
-
"matplotlib >= 3.10.
|
|
23
|
-
"numpy >= 2.3
|
|
24
|
-
"pandas >=
|
|
25
|
-
"scikit-learn >= 1.
|
|
22
|
+
"matplotlib >= 3.10.8",
|
|
23
|
+
"numpy >= 2.4.3",
|
|
24
|
+
"pandas >= 3.0.1",
|
|
25
|
+
"scikit-learn >= 1.8.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = [
|
|
30
|
+
"pip-tools >= 7.5.3",
|
|
31
|
+
"pytest >= 9.0.2",
|
|
32
|
+
"pytest-cov >= 7.0.0",
|
|
26
33
|
]
|
|
27
34
|
|
|
28
35
|
[project.urls]
|
|
29
|
-
Homepage = "https://github.com/opengood-
|
|
30
|
-
Documentation = "https://github.com/opengood-
|
|
36
|
+
Homepage = "https://github.com/opengood-ai/py-ml-plot"
|
|
37
|
+
Documentation = "https://github.com/opengood-ai/py-ml-plot"
|
|
31
38
|
|
|
32
39
|
[tool.pytest.ini_options]
|
|
33
|
-
addopts = "
|
|
40
|
+
addopts = "-v --cov=src.opengood.py_ml_plot --cov-report=xml --cov-fail-under=70"
|
|
41
|
+
testpaths = ["tests"]
|
|
34
42
|
python_files = "test_*.py"
|
|
35
43
|
python_functions = "test_*"
|
|
36
44
|
markers = [
|
{opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0/src/opengood.py_ml_plot.egg-info}/PKG-INFO
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opengood.py_ml_plot
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.5.0
|
|
4
4
|
Summary: Modules containing reusable functions for machine learning visualization plotting
|
|
5
5
|
Author-email: OpenGood <ai@opengood.ai>
|
|
6
6
|
License: MIT License
|
|
7
7
|
|
|
8
|
-
Copyright (c) 2025 OpenGood
|
|
8
|
+
Copyright (c) 2025-2026 OpenGood
|
|
9
9
|
|
|
10
10
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
11
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -25,30 +25,34 @@ License: MIT License
|
|
|
25
25
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
26
|
SOFTWARE.
|
|
27
27
|
|
|
28
|
-
Project-URL: Homepage, https://github.com/opengood-
|
|
29
|
-
Project-URL: Documentation, https://github.com/opengood-
|
|
28
|
+
Project-URL: Homepage, https://github.com/opengood-ai/py-ml-plot
|
|
29
|
+
Project-URL: Documentation, https://github.com/opengood-ai/py-ml-plot
|
|
30
30
|
Classifier: Programming Language :: Python :: 3
|
|
31
31
|
Classifier: License :: OSI Approved :: MIT License
|
|
32
32
|
Classifier: Operating System :: OS Independent
|
|
33
33
|
Requires-Python: >=3.12
|
|
34
34
|
Description-Content-Type: text/markdown
|
|
35
35
|
License-File: LICENSE
|
|
36
|
-
Requires-Dist: matplotlib>=3.10.
|
|
37
|
-
Requires-Dist: numpy>=2.3
|
|
38
|
-
Requires-Dist: pandas>=
|
|
39
|
-
Requires-Dist: scikit-learn>=1.
|
|
36
|
+
Requires-Dist: matplotlib>=3.10.8
|
|
37
|
+
Requires-Dist: numpy>=2.4.3
|
|
38
|
+
Requires-Dist: pandas>=3.0.1
|
|
39
|
+
Requires-Dist: scikit-learn>=1.8.0
|
|
40
|
+
Provides-Extra: dev
|
|
41
|
+
Requires-Dist: pip-tools>=7.5.3; extra == "dev"
|
|
42
|
+
Requires-Dist: pytest>=9.0.2; extra == "dev"
|
|
43
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
|
|
40
44
|
Dynamic: license-file
|
|
41
45
|
|
|
42
46
|
# Python Machine Learning (ML) Plot
|
|
43
47
|
|
|
44
|
-
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Abuild)
|
|
49
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions?query=workflow%3Arelease)
|
|
50
|
+
[](https://github.com/opengood-ai/py-ml-plot/actions/workflows/codeql.yml)
|
|
51
|
+
[](https://codecov.io/gh/opengood-ai/py-ml-plot)
|
|
52
|
+
[](https://github.com/opengood-ai/py-ml-plot/releases/latest)
|
|
49
53
|
[](https://pypi.org/project/opengood.py-ml-plot/)
|
|
50
54
|

|
|
51
|
-
[](https://raw.githubusercontent.com/opengood-
|
|
55
|
+
[](https://raw.githubusercontent.com/opengood-ai/py-ml-plot/master/LICENSE)
|
|
52
56
|
|
|
53
57
|
Modules containing reusable functions for machine learning visualization
|
|
54
58
|
plotting
|
|
@@ -139,7 +143,7 @@ plt.show()
|
|
|
139
143
|
|
|
140
144
|
##### Output
|
|
141
145
|
|
|
142
|
-

|
|
143
147
|
|
|
144
148
|
---
|
|
145
149
|
|
|
@@ -150,8 +154,8 @@ plt.show()
|
|
|
150
154
|
`feature_scale` lambda implementation logic for function
|
|
151
155
|
`setup_classification_plot` is as follows:
|
|
152
156
|
|
|
153
|
-
* Inverse feature scaling is invoked via a
|
|
154
|
-
the `
|
|
157
|
+
* Inverse feature scaling is invoked via a feature scaling object, such as
|
|
158
|
+
the `StandardScaler` object `sc` created earlier for feature scaling
|
|
155
159
|
* `x_set` and `y_set` are assigned non-feature scaled values of the matrix of
|
|
156
160
|
features and the dependent variable
|
|
157
161
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
@@ -181,19 +185,22 @@ is as follows:
|
|
|
181
185
|
Visualization implementation logic for function `setup_classification_plot` is
|
|
182
186
|
as follows:
|
|
183
187
|
|
|
184
|
-
* `
|
|
185
|
-
|
|
188
|
+
* If the `meshgrid` dict is not defined, a default set of dict attributes are
|
|
189
|
+
set providing min, max, and step values for each axis:
|
|
190
|
+
* `0` and `1` are used for the keys
|
|
191
|
+
* `10` and `1000` are used for `min` and `max` values
|
|
192
|
+
* `0.25` is used for `step` value
|
|
193
|
+
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
194
|
+
assigned the values of `x` and `y`, respectively
|
|
186
195
|
* If the `feature_scale` lambda is defined, `x_set` and `y_set` are
|
|
187
196
|
assigned non-feature scaled values of the matrix of features and the dependent
|
|
188
197
|
variable from the sets using a feature scaling object, such as the
|
|
189
|
-
`
|
|
198
|
+
`StandardScaler` object created earlier for feature scaling
|
|
190
199
|
* `x_set` values are inverted from their feature-scaled values in `x`
|
|
191
200
|
* `y_set` values are not inverted and taken directly from `y`
|
|
192
|
-
* If the `feature_scale` lambda is not defined, `x_set` and `y_set` are
|
|
193
|
-
assigned the values of `x` and `y`, respectively
|
|
194
201
|
* `meshgrid` function from the NumPy library returns a tuple of coordinate
|
|
195
|
-
matrices from coordinate vectors
|
|
196
|
-
the `meshgrid` dict parameter
|
|
202
|
+
matrices from coordinate vectors
|
|
203
|
+
* The ranges for each axis are controlled by the `meshgrid` dict parameter
|
|
197
204
|
* Two sets of matrices (`x1` and `x2`) are returned with coordinate vectors
|
|
198
205
|
* `x1`
|
|
199
206
|
* `arange` function is called with a defined start and stop interval
|
|
@@ -225,7 +232,7 @@ as follows:
|
|
|
225
232
|
* `step` parameter
|
|
226
233
|
* Spacing between values
|
|
227
234
|
* Value of `0.25` is added for spacing
|
|
228
|
-
* The prediction logic implemented in the `
|
|
235
|
+
* The prediction logic implemented in the `predict` lambda is executed, and
|
|
229
236
|
the result is assigned to `y_pred`, containing the predictions
|
|
230
237
|
* `contourf` function from the Matplotlib library is used for creating filled
|
|
231
238
|
contour plots
|
|
@@ -302,32 +309,54 @@ as follows:
|
|
|
302
309
|
|
|
303
310
|
## Python Virtual Environment
|
|
304
311
|
|
|
305
|
-
Create Python virtual environment:
|
|
312
|
+
Create and activate Python virtual environment:
|
|
306
313
|
|
|
307
314
|
```bash
|
|
308
|
-
|
|
309
|
-
python3 -m venv ~/workspace/opengood-aio/py-ml-plot/.venv
|
|
315
|
+
python3 -m venv .venv
|
|
310
316
|
source .venv/bin/activate
|
|
311
317
|
```
|
|
312
318
|
|
|
313
|
-
## Install
|
|
319
|
+
## Install Dependencies
|
|
320
|
+
|
|
321
|
+
Install the package in editable mode with all dependencies:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
python3 -m pip install -e .
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
Install with development dependencies (includes `pip-tools`, `pytest`, `pytest-cov`):
|
|
314
328
|
|
|
315
329
|
```bash
|
|
316
|
-
python3 -m pip install
|
|
317
|
-
python3 -m pip install numpy
|
|
318
|
-
python3 -m pip install pandas
|
|
319
|
-
python3 -m pip install scikit-learn
|
|
330
|
+
python3 -m pip install -e ".[dev]"
|
|
320
331
|
```
|
|
321
332
|
|
|
322
|
-
##
|
|
333
|
+
## Generate Requirements File
|
|
334
|
+
|
|
335
|
+
Generate a pinned `requirements.txt` file from pyproject.toml:
|
|
323
336
|
|
|
324
337
|
```bash
|
|
325
|
-
pip
|
|
338
|
+
pip-compile pyproject.toml -o requirements.txt
|
|
326
339
|
```
|
|
327
340
|
|
|
341
|
+
This creates a `requirements.txt` with exact versions of all dependencies and their transitive dependencies.
|
|
342
|
+
|
|
328
343
|
## Run Tests
|
|
329
344
|
|
|
345
|
+
Run all tests with coverage:
|
|
346
|
+
|
|
330
347
|
```bash
|
|
331
348
|
python -m pytest tests/
|
|
332
349
|
```
|
|
333
350
|
|
|
351
|
+
Run tests with verbose output and coverage report:
|
|
352
|
+
|
|
353
|
+
```bash
|
|
354
|
+
python -m pytest tests/ -v --cov=src.opengood.py_ml_plot --cov-report=term-missing
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Run a specific test:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
python -m pytest tests/py_ml_plot/test_classification_plot.py::TestClassificationPlot::test_logistic_regression_setup_classification_plot_with_shaded_regions
|
|
361
|
+
```
|
|
362
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{opengood_py_ml_plot-2.3.0 → opengood_py_ml_plot-2.5.0}/src/opengood.py_ml_plot.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|