mnplib 2.0.0a1__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.
- mnplib-2.0.0a1/PKG-INFO +102 -0
- mnplib-2.0.0a1/README.md +69 -0
- mnplib-2.0.0a1/mnplib/__init__.py +1 -0
- mnplib-2.0.0a1/mnplib/anomalies.py +1053 -0
- mnplib-2.0.0a1/mnplib/automl/__init__.py +12 -0
- mnplib-2.0.0a1/mnplib/automl/evaluator.py +147 -0
- mnplib-2.0.0a1/mnplib/automl/results.py +48 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/__init__.py +24 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/_feature_order.py +47 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/base.py +50 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/decision_tree.py +121 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/linear_models.py +87 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/linear_svm.py +168 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/logistic.py +221 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/naive_bayes.py +141 -0
- mnplib-2.0.0a1/mnplib/automl/searchers/neural_network.py +342 -0
- mnplib-2.0.0a1/mnplib/automl/wrappers.py +75 -0
- mnplib-2.0.0a1/mnplib/classifier.py +478 -0
- mnplib-2.0.0a1/mnplib/inaccuracy.py +303 -0
- mnplib-2.0.0a1/mnplib/miscoding.py +905 -0
- mnplib-2.0.0a1/mnplib/models/__init__.py +24 -0
- mnplib-2.0.0a1/mnplib/models/artifacts.py +54 -0
- mnplib-2.0.0a1/mnplib/models/serializers/__init__.py +20 -0
- mnplib-2.0.0a1/mnplib/models/serializers/base.py +203 -0
- mnplib-2.0.0a1/mnplib/models/serializers/linear.py +345 -0
- mnplib-2.0.0a1/mnplib/models/serializers/naive_bayes.py +245 -0
- mnplib-2.0.0a1/mnplib/models/serializers/neural_network.py +515 -0
- mnplib-2.0.0a1/mnplib/models/serializers/svm.py +353 -0
- mnplib-2.0.0a1/mnplib/models/serializers/tree.py +156 -0
- mnplib-2.0.0a1/mnplib/models/sklearn.py +112 -0
- mnplib-2.0.0a1/mnplib/nescience.py +720 -0
- mnplib-2.0.0a1/mnplib/regressor.py +357 -0
- mnplib-2.0.0a1/mnplib/surfeit.py +336 -0
- mnplib-2.0.0a1/mnplib/timeseries/__init__.py +14 -0
- mnplib-2.0.0a1/mnplib/timeseries/estimator.py +668 -0
- mnplib-2.0.0a1/mnplib/timeseries/lagged.py +221 -0
- mnplib-2.0.0a1/mnplib/timeseries/models.py +190 -0
- mnplib-2.0.0a1/mnplib/timeseries/selection.py +174 -0
- mnplib-2.0.0a1/mnplib/timeseries.py +647 -0
- mnplib-2.0.0a1/mnplib/utils.py +533 -0
- mnplib-2.0.0a1/mnplib.egg-info/PKG-INFO +102 -0
- mnplib-2.0.0a1/mnplib.egg-info/SOURCES.txt +46 -0
- mnplib-2.0.0a1/mnplib.egg-info/dependency_links.txt +1 -0
- mnplib-2.0.0a1/mnplib.egg-info/requires.txt +12 -0
- mnplib-2.0.0a1/mnplib.egg-info/top_level.txt +1 -0
- mnplib-2.0.0a1/pyproject.toml +65 -0
- mnplib-2.0.0a1/setup.cfg +4 -0
- mnplib-2.0.0a1/setup.py +4 -0
mnplib-2.0.0a1/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mnplib
|
|
3
|
+
Version: 2.0.0a1
|
|
4
|
+
Summary: Machine learning with the Minimum Nescience Principle
|
|
5
|
+
Author-email: "R. Garcia Leiva" <rgarcialeiva@gmail.com>
|
|
6
|
+
License: GPL-3.0-only
|
|
7
|
+
Project-URL: Homepage, https://github.com/rleiva/mnplib
|
|
8
|
+
Project-URL: Repository, https://github.com/rleiva/mnplib
|
|
9
|
+
Project-URL: Issues, https://github.com/rleiva/mnplib/issues
|
|
10
|
+
Keywords: machine-learning,automl,minimum-nescience,scikit-learn,time-series
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: >=3.9
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
Requires-Dist: numpy>=1.23
|
|
24
|
+
Requires-Dist: pandas>=1.5
|
|
25
|
+
Requires-Dist: scikit-learn>=1.2
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
29
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
30
|
+
Provides-Extra: examples
|
|
31
|
+
Requires-Dist: jupyter>=1.0; extra == "examples"
|
|
32
|
+
Requires-Dist: matplotlib>=3.7; extra == "examples"
|
|
33
|
+
|
|
34
|
+
# Machine Learning
|
|
35
|
+
## with the Minimum Nescience Principle
|
|
36
|
+
|
|
37
|
+
`mnplib` is a highly efficient open source library for machine learning based on Python and built on top of [scikit-learn](https://scikit-learn.org/stable/). The library is based on the [_minimum nescience principle_](https://www.amazon.com/dp/B0GZH1FZ9J), a novel mathematical theory that measures how well we understand a problem given a representation and a description. In case of machine learning, representations are based on datasets, and descriptions are based on mathematical models.
|
|
38
|
+
|
|
39
|
+
The minimum nescience principle allow us to automate the common tasks performed by data scientists, from feature selection, model selection, or hyperparameters optimization.
|
|
40
|
+
|
|
41
|
+
`mnplib` can dramatically increase the productivity of the data scientist, reducing the time to analyze and model a dataset. With `mnplib` we can have results in very short time, without decreasing the accuracy (in fact, we usually have a better accuracy). `mnplib` is fast because:
|
|
42
|
+
|
|
43
|
+
* It does not requires cross-validation
|
|
44
|
+
* It use a greedy search for hyperparameters
|
|
45
|
+
* It is not based on ensembles of models
|
|
46
|
+
|
|
47
|
+
Warning: This is an alpha release of mnplib 2.0. The API and documentation are still under active revision.
|
|
48
|
+
|
|
49
|
+
## The Library
|
|
50
|
+
|
|
51
|
+
The `mnplib` library is composed of the following classes:
|
|
52
|
+
|
|
53
|
+
* `Miscoding` measures the quality of the dataset we are using to represent our problem.
|
|
54
|
+
* `Inaccuracy` measures the error made by the model we have trained.
|
|
55
|
+
* `Surfeit` measures how (unnecessarily) complex is the model we have identified.
|
|
56
|
+
|
|
57
|
+
All these metrics are combined into a single quantity, called `Nescience`, as a measure of how well we understand our problem given a dataset and a model. `Nescience` allow us to evaluate and compare models from different model families.
|
|
58
|
+
|
|
59
|
+
The `mnplib` library also contains the following utilities:
|
|
60
|
+
|
|
61
|
+
* `Anomalies` for the identification and classification of anomalies.
|
|
62
|
+
* `Causal` for root-cause analysis.
|
|
63
|
+
|
|
64
|
+
Besides to these classes, the `mnplib` library provide the following automated machine-learning tools:
|
|
65
|
+
|
|
66
|
+
* `Regression` for automated regression problems.
|
|
67
|
+
* `Classification` for automated classification problems.
|
|
68
|
+
* `TimeSeries` for time series based analysis and forecasting.
|
|
69
|
+
|
|
70
|
+
## Installation
|
|
71
|
+
|
|
72
|
+
The `mnplib` library can be installed using the standard `pip` installer:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
pip install mnplib
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The following code constains a simple example of how to use the auto-classifer module of the library:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from sklearn.datasets import load_breast_cancer
|
|
82
|
+
from mnplib.classifier import Classifier
|
|
83
|
+
|
|
84
|
+
X, y = load_breast_cancer(return_X_y=True)
|
|
85
|
+
|
|
86
|
+
model = Classifier()
|
|
87
|
+
model.fit(X, y)
|
|
88
|
+
model.score(X, y)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## User Guide
|
|
92
|
+
|
|
93
|
+
This user guide contains the following sections:
|
|
94
|
+
|
|
95
|
+
* [Feature Selection](https://github.com/rleiva/fastautoml/wiki/Feature-Selection)
|
|
96
|
+
* [Model Inaccuacy](https://github.com/rleiva/fastautoml/wiki/Model-Inaccuracy)
|
|
97
|
+
* [Model Complexity](https://github.com/rleiva/fastautoml/wiki/Model-Complexity)
|
|
98
|
+
* [Hyperparameters Selection](https://github.com/rleiva/fastautoml/wiki/Hyperparameters-Selection)
|
|
99
|
+
* [Auto Classification](https://github.com/rleiva/fastautoml/wiki/Auto-Classification)
|
|
100
|
+
* [Auto Regression](https://github.com/rleiva/fastautoml/wiki/Auto-Regression)
|
|
101
|
+
* [Time Series](https://github.com/rleiva/fastautoml/wiki/Time-Series-Analysis)
|
|
102
|
+
* [Anomalies Detection](https://github.com/rleiva/nescience/wiki/Anomalies-Detection)
|
mnplib-2.0.0a1/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Machine Learning
|
|
2
|
+
## with the Minimum Nescience Principle
|
|
3
|
+
|
|
4
|
+
`mnplib` is a highly efficient open source library for machine learning based on Python and built on top of [scikit-learn](https://scikit-learn.org/stable/). The library is based on the [_minimum nescience principle_](https://www.amazon.com/dp/B0GZH1FZ9J), a novel mathematical theory that measures how well we understand a problem given a representation and a description. In case of machine learning, representations are based on datasets, and descriptions are based on mathematical models.
|
|
5
|
+
|
|
6
|
+
The minimum nescience principle allow us to automate the common tasks performed by data scientists, from feature selection, model selection, or hyperparameters optimization.
|
|
7
|
+
|
|
8
|
+
`mnplib` can dramatically increase the productivity of the data scientist, reducing the time to analyze and model a dataset. With `mnplib` we can have results in very short time, without decreasing the accuracy (in fact, we usually have a better accuracy). `mnplib` is fast because:
|
|
9
|
+
|
|
10
|
+
* It does not requires cross-validation
|
|
11
|
+
* It use a greedy search for hyperparameters
|
|
12
|
+
* It is not based on ensembles of models
|
|
13
|
+
|
|
14
|
+
Warning: This is an alpha release of mnplib 2.0. The API and documentation are still under active revision.
|
|
15
|
+
|
|
16
|
+
## The Library
|
|
17
|
+
|
|
18
|
+
The `mnplib` library is composed of the following classes:
|
|
19
|
+
|
|
20
|
+
* `Miscoding` measures the quality of the dataset we are using to represent our problem.
|
|
21
|
+
* `Inaccuracy` measures the error made by the model we have trained.
|
|
22
|
+
* `Surfeit` measures how (unnecessarily) complex is the model we have identified.
|
|
23
|
+
|
|
24
|
+
All these metrics are combined into a single quantity, called `Nescience`, as a measure of how well we understand our problem given a dataset and a model. `Nescience` allow us to evaluate and compare models from different model families.
|
|
25
|
+
|
|
26
|
+
The `mnplib` library also contains the following utilities:
|
|
27
|
+
|
|
28
|
+
* `Anomalies` for the identification and classification of anomalies.
|
|
29
|
+
* `Causal` for root-cause analysis.
|
|
30
|
+
|
|
31
|
+
Besides to these classes, the `mnplib` library provide the following automated machine-learning tools:
|
|
32
|
+
|
|
33
|
+
* `Regression` for automated regression problems.
|
|
34
|
+
* `Classification` for automated classification problems.
|
|
35
|
+
* `TimeSeries` for time series based analysis and forecasting.
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
The `mnplib` library can be installed using the standard `pip` installer:
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
pip install mnplib
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The following code constains a simple example of how to use the auto-classifer module of the library:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from sklearn.datasets import load_breast_cancer
|
|
49
|
+
from mnplib.classifier import Classifier
|
|
50
|
+
|
|
51
|
+
X, y = load_breast_cancer(return_X_y=True)
|
|
52
|
+
|
|
53
|
+
model = Classifier()
|
|
54
|
+
model.fit(X, y)
|
|
55
|
+
model.score(X, y)
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## User Guide
|
|
59
|
+
|
|
60
|
+
This user guide contains the following sections:
|
|
61
|
+
|
|
62
|
+
* [Feature Selection](https://github.com/rleiva/fastautoml/wiki/Feature-Selection)
|
|
63
|
+
* [Model Inaccuacy](https://github.com/rleiva/fastautoml/wiki/Model-Inaccuracy)
|
|
64
|
+
* [Model Complexity](https://github.com/rleiva/fastautoml/wiki/Model-Complexity)
|
|
65
|
+
* [Hyperparameters Selection](https://github.com/rleiva/fastautoml/wiki/Hyperparameters-Selection)
|
|
66
|
+
* [Auto Classification](https://github.com/rleiva/fastautoml/wiki/Auto-Classification)
|
|
67
|
+
* [Auto Regression](https://github.com/rleiva/fastautoml/wiki/Auto-Regression)
|
|
68
|
+
* [Time Series](https://github.com/rleiva/fastautoml/wiki/Time-Series-Analysis)
|
|
69
|
+
* [Anomalies Detection](https://github.com/rleiva/nescience/wiki/Anomalies-Detection)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.0.0a1"
|