mlquantify 0.0.1__tar.gz → 0.0.11__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.
@@ -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
+ ...
@@ -0,0 +1,103 @@
1
+ <h1 align="center">MLQuantify</h1>
2
+ <h4 align="center">A Python Package for Quantification</h4>
3
+
4
+ ___
5
+
6
+ **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.
7
+
8
+ ___
9
+
10
+ ## Latest Release
11
+
12
+ - **Version 0.0.1**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
13
+ - In case you need any help, refer to the [wiki](https://github.com/luizfernandolj/mlquantify/wiki).
14
+ - Explore the [API documentation](#) for detailed developer information.
15
+ - See also the library in the pypi site in [pypi mlquantify](https://pypi.org/project/mlquantify/)
16
+
17
+ ___
18
+
19
+ ## Installation
20
+
21
+ To install mlquantify, run the following command:
22
+
23
+ ```bash
24
+ pip install mlquantify
25
+ ```
26
+
27
+ ___
28
+
29
+ ## Contents
30
+
31
+ | Section | Description |
32
+ |---|---|
33
+ | **Quantification Methods** | Methods for quantification, such as classify & Count Correct methods, Threshold Optimization, Mixture Models and more.|
34
+ | **Dynamic class management** | All methods are dynamic, and handles multiclass and binary problems, in case of binary it makes One-Vs-All (OVA) automatically. |
35
+ | **Model Selection** | Criteria and processes used to select the best model, such as grid-search for the case of quantification|
36
+ | **Evaluation Metrics** | Specific metrics used to evaluate quantification performance, (e.g., AE, BIAS, NAE, SE, KLD, etc.). |
37
+ | **Evaluation Protocols** | Evaluation protocols used, based on sampling generation (e.g., APP, NPP, etc.).. |
38
+ | **Plotting Results** | Tools and techniques used to visualize results, such as the protocol results.|
39
+ | **Comprehensive Documentation** | Complete documentation of the project, including code, data, and results. |
40
+
41
+ ___
42
+
43
+ ## Quick example:
44
+
45
+ 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.
46
+
47
+ ```python
48
+ import mlquantify as mq
49
+ from sklearn.ensemble import RandomForestClassifier
50
+ from sklearn.datasets import load_breast_cancer
51
+ from sklearn.model_selection import train_test_split
52
+
53
+ # Loading dataset from sklearn
54
+ features, target = load_breast_cancer(return_X_y=True)
55
+
56
+ #Splitting into train and test
57
+ X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.3)
58
+
59
+ #Create the model, here it is the Expectation Maximisation Quantifier (EMQ) with a classifier
60
+ model = mq.methods.EMQ(RandomForestClassifier())
61
+ model.fit(X_train, y_train)
62
+
63
+ #Predict the class prevalence for X_test
64
+ pred_prevalence = model.predict(X_test)
65
+ real_prevalence = mq.utils.get_real_prev(y_test)
66
+
67
+ #Get the error for the prediction
68
+ ae = mq.evaluation.absolute_error(real_prevalence, pred_prevalence)
69
+ bias = mq.evaluation.bias(real_prevalence, pred_prevalence)
70
+
71
+ print(f"Mean Squared Error (MSE) -> {ae:.4f}")
72
+ print(f"Bias -> {bias}")
73
+ ```
74
+
75
+ ___
76
+
77
+ ## Requirements
78
+
79
+ - Scikit-learn
80
+ - pandas
81
+ - numpy
82
+ - joblib
83
+ - tqdm
84
+ - matplotlib
85
+ - xlrd
86
+
87
+ ___
88
+
89
+ ## Documentation
90
+
91
+ ##### API is avaliable [here](#)
92
+
93
+ - [Methods](https://github.com/luizfernandolj/mlquantify/wiki/Methods)
94
+ - [Model Selection](#)
95
+ - [Evaluation](#)
96
+ - [Plotting](#)
97
+
98
+
99
+ ___
100
+
101
+ ### See the References in the pdf below
102
+
103
+ ...
@@ -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
+ ...
@@ -1,6 +1,12 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- VERSION = '0.0.1'
3
+ import pathlib
4
+
5
+ here = pathlib.Path(__file__).parent.resolve()
6
+
7
+ long_description = (here / 'README.md').read_text(encoding='utf-8')
8
+
9
+ VERSION = '0.0.11'
4
10
  DESCRIPTION = 'Quantification Library'
5
11
 
6
12
  # Setting up
@@ -10,6 +16,7 @@ setup(
10
16
  url="https://github.com/luizfernandolj/QuantifyML/tree/master",
11
17
  maintainer="Luiz Fernando Luth Junior",
12
18
  description=DESCRIPTION,
19
+ long_description=long_description,
13
20
  long_description_content_type="text/markdown",
14
21
  packages=find_packages(),
15
22
  include_package_data=True,
mlquantify-0.0.1/PKG-INFO DELETED
@@ -1,22 +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
@@ -1,2 +0,0 @@
1
- # LibQuantifiers
2
- Quantification package
@@ -1,22 +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
File without changes
File without changes