mlquantify 0.0.1__py3-none-any.whl → 0.0.11__py3-none-any.whl

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.
@@ -0,0 +1,126 @@
1
+ Metadata-Version: 2.1
2
+ Name: mlquantify
3
+ Version: 0.0.11
4
+ Summary: Quantification Library
5
+ Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
+ Maintainer: Luiz Fernando Luth Junior
7
+ Keywords: python,machine learning,quantification,quantify
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: Unix
12
+ Classifier: Operating System :: MacOS :: MacOS X
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Description-Content-Type: text/markdown
15
+ Requires-Dist: scikit-learn
16
+ Requires-Dist: numpy
17
+ Requires-Dist: scipy
18
+ Requires-Dist: joblib
19
+ Requires-Dist: tqdm
20
+ Requires-Dist: pandas
21
+ Requires-Dist: xlrd
22
+ Requires-Dist: matplotlib
23
+
24
+ <h1 align="center">MLQuantify</h1>
25
+ <h4 align="center">A Python Package for Quantification</h4>
26
+
27
+ ___
28
+
29
+ **mlquantify** is a Python library for quantification, also known as supervised prevalence estimation, designed to estimate the distribution of classes within datasets. It offers a range of tools for various quantification methods, model selection tailored for quantification tasks, evaluation metrics, and protocols to assess quantification performance. Additionally, mlquantify includes popular datasets and visualization tools to help analyze and interpret results.
30
+
31
+ ___
32
+
33
+ ## Latest Release
34
+
35
+ - **Version 0.0.1**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
36
+ - In case you need any help, refer to the [wiki](https://github.com/luizfernandolj/mlquantify/wiki).
37
+ - Explore the [API documentation](#) for detailed developer information.
38
+ - See also the library in the pypi site in [pypi mlquantify](https://pypi.org/project/mlquantify/)
39
+
40
+ ___
41
+
42
+ ## Installation
43
+
44
+ To install mlquantify, run the following command:
45
+
46
+ ```bash
47
+ pip install mlquantify
48
+ ```
49
+
50
+ ___
51
+
52
+ ## Contents
53
+
54
+ | Section | Description |
55
+ |---|---|
56
+ | **Quantification Methods** | Methods for quantification, such as classify & Count Correct methods, Threshold Optimization, Mixture Models and more.|
57
+ | **Dynamic class management** | All methods are dynamic, and handles multiclass and binary problems, in case of binary it makes One-Vs-All (OVA) automatically. |
58
+ | **Model Selection** | Criteria and processes used to select the best model, such as grid-search for the case of quantification|
59
+ | **Evaluation Metrics** | Specific metrics used to evaluate quantification performance, (e.g., AE, BIAS, NAE, SE, KLD, etc.). |
60
+ | **Evaluation Protocols** | Evaluation protocols used, based on sampling generation (e.g., APP, NPP, etc.).. |
61
+ | **Plotting Results** | Tools and techniques used to visualize results, such as the protocol results.|
62
+ | **Comprehensive Documentation** | Complete documentation of the project, including code, data, and results. |
63
+
64
+ ___
65
+
66
+ ## Quick example:
67
+
68
+ This code first loads the breast cancer dataset from _sklearn_, which is then split into training and testing sets. It uses the _Expectation Maximisation Quantifier (EMQ)_ with a RandomForest classifier to predict class prevalence. After training the model, it evaluates performance by calculating and printing the absolute error and bias between the real and predicted prevalences.
69
+
70
+ ```python
71
+ import mlquantify as mq
72
+ from sklearn.ensemble import RandomForestClassifier
73
+ from sklearn.datasets import load_breast_cancer
74
+ from sklearn.model_selection import train_test_split
75
+
76
+ # Loading dataset from sklearn
77
+ features, target = load_breast_cancer(return_X_y=True)
78
+
79
+ #Splitting into train and test
80
+ X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.3)
81
+
82
+ #Create the model, here it is the Expectation Maximisation Quantifier (EMQ) with a classifier
83
+ model = mq.methods.EMQ(RandomForestClassifier())
84
+ model.fit(X_train, y_train)
85
+
86
+ #Predict the class prevalence for X_test
87
+ pred_prevalence = model.predict(X_test)
88
+ real_prevalence = mq.utils.get_real_prev(y_test)
89
+
90
+ #Get the error for the prediction
91
+ ae = mq.evaluation.absolute_error(real_prevalence, pred_prevalence)
92
+ bias = mq.evaluation.bias(real_prevalence, pred_prevalence)
93
+
94
+ print(f"Mean Squared Error (MSE) -> {ae:.4f}")
95
+ print(f"Bias -> {bias}")
96
+ ```
97
+
98
+ ___
99
+
100
+ ## Requirements
101
+
102
+ - Scikit-learn
103
+ - pandas
104
+ - numpy
105
+ - joblib
106
+ - tqdm
107
+ - matplotlib
108
+ - xlrd
109
+
110
+ ___
111
+
112
+ ## Documentation
113
+
114
+ ##### API is avaliable [here](#)
115
+
116
+ - [Methods](https://github.com/luizfernandolj/mlquantify/wiki/Methods)
117
+ - [Model Selection](#)
118
+ - [Evaluation](#)
119
+ - [Plotting](#)
120
+
121
+
122
+ ___
123
+
124
+ ### See the References in the pdf below
125
+
126
+ ...
@@ -67,7 +67,7 @@ mlquantify/utils/method_purposes/get_scores.py,sha256=qdIVYUS8xd8Vt86k19yETDNfib
67
67
  mlquantify/utils/method_purposes/moss.py,sha256=CVDDMHxPBnl_U2hz7Aqvne7jhB2mBUsVzTTsaiLQhOc,352
68
68
  mlquantify/utils/method_purposes/ternary_search.py,sha256=JpNrfJsA5kWuanVW_hyMucy7rQ9UzTSgazFpTRi9jMI,416
69
69
  mlquantify/utils/method_purposes/tprfpr.py,sha256=VKniG5aK8IwAA2fXEhkdHtwnx1zHH12qhwS4kKW5Dlo,1181
70
- mlquantify-0.0.1.dist-info/METADATA,sha256=hT32pA_BUXMWzHfQ12L9LmVzlc1plpWG8rVPSYSxPwE,774
71
- mlquantify-0.0.1.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
72
- mlquantify-0.0.1.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
73
- mlquantify-0.0.1.dist-info/RECORD,,
70
+ mlquantify-0.0.11.dist-info/METADATA,sha256=AxlZw2SFQgWJhj_LDg1CSabLaTyF4qQ43ErYsDNyHcs,4585
71
+ mlquantify-0.0.11.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
72
+ mlquantify-0.0.11.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
73
+ mlquantify-0.0.11.dist-info/RECORD,,
@@ -1,23 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: mlquantify
3
- Version: 0.0.1
4
- Summary: Quantification Library
5
- Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
- Maintainer: Luiz Fernando Luth Junior
7
- Keywords: python,machine learning,quantification,quantify
8
- Classifier: Development Status :: 4 - Beta
9
- Classifier: Intended Audience :: Science/Research
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Operating System :: Unix
12
- Classifier: Operating System :: MacOS :: MacOS X
13
- Classifier: Operating System :: Microsoft :: Windows
14
- Description-Content-Type: text/markdown
15
- Requires-Dist: scikit-learn
16
- Requires-Dist: numpy
17
- Requires-Dist: scipy
18
- Requires-Dist: joblib
19
- Requires-Dist: tqdm
20
- Requires-Dist: pandas
21
- Requires-Dist: xlrd
22
- Requires-Dist: matplotlib
23
-