mlquantify 0.1.10__tar.gz → 0.1.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.
Files changed (61) hide show
  1. {mlquantify-0.1.10/mlquantify.egg-info → mlquantify-0.1.11}/PKG-INFO +10 -18
  2. {mlquantify-0.1.10 → mlquantify-0.1.11}/README.md +9 -17
  3. mlquantify-0.1.11/VERSION.txt +1 -0
  4. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_validation.py +3 -3
  5. {mlquantify-0.1.10 → mlquantify-0.1.11/mlquantify.egg-info}/PKG-INFO +10 -18
  6. mlquantify-0.1.10/VERSION.txt +0 -1
  7. {mlquantify-0.1.10 → mlquantify-0.1.11}/MANIFEST.in +0 -0
  8. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/__init__.py +0 -0
  9. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/adjust_counting/__init__.py +0 -0
  10. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/adjust_counting/_adjustment.py +0 -0
  11. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/adjust_counting/_base.py +0 -0
  12. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/adjust_counting/_counting.py +0 -0
  13. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/adjust_counting/_utils.py +0 -0
  14. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/base.py +0 -0
  15. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/base_aggregative.py +0 -0
  16. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/calibration.py +0 -0
  17. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/confidence.py +0 -0
  18. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/likelihood/__init__.py +0 -0
  19. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/likelihood/_base.py +0 -0
  20. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/likelihood/_classes.py +0 -0
  21. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/meta/__init__.py +0 -0
  22. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/meta/_classes.py +0 -0
  23. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/metrics/__init__.py +0 -0
  24. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/metrics/_oq.py +0 -0
  25. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/metrics/_rq.py +0 -0
  26. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/metrics/_slq.py +0 -0
  27. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/mixture/__init__.py +0 -0
  28. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/mixture/_base.py +0 -0
  29. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/mixture/_classes.py +0 -0
  30. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/mixture/_utils.py +0 -0
  31. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/model_selection/__init__.py +0 -0
  32. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/model_selection/_protocol.py +0 -0
  33. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/model_selection/_search.py +0 -0
  34. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/model_selection/_split.py +0 -0
  35. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/multiclass.py +0 -0
  36. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/__init__.py +0 -0
  37. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/_base.py +0 -0
  38. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/_classes.py +0 -0
  39. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/_classification.py +0 -0
  40. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/_kde.py +0 -0
  41. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neighbors/_utils.py +0 -0
  42. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/neural/__init__.py +0 -0
  43. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/__init__.py +0 -0
  44. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_artificial.py +0 -0
  45. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_constraints.py +0 -0
  46. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_context.py +0 -0
  47. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_decorators.py +0 -0
  48. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_exceptions.py +0 -0
  49. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_get_scores.py +0 -0
  50. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_load.py +0 -0
  51. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_parallel.py +0 -0
  52. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_random.py +0 -0
  53. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_sampling.py +0 -0
  54. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/_tags.py +0 -0
  55. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify/utils/prevalence.py +0 -0
  56. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify.egg-info/SOURCES.txt +0 -0
  57. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify.egg-info/dependency_links.txt +0 -0
  58. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify.egg-info/requires.txt +0 -0
  59. {mlquantify-0.1.10 → mlquantify-0.1.11}/mlquantify.egg-info/top_level.txt +0 -0
  60. {mlquantify-0.1.10 → mlquantify-0.1.11}/setup.cfg +0 -0
  61. {mlquantify-0.1.10 → mlquantify-0.1.11}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlquantify
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -30,7 +30,7 @@ Dynamic: maintainer
30
30
  Dynamic: requires-dist
31
31
  Dynamic: summary
32
32
 
33
- <h1 align="center">MLQuantify</h1>
33
+ <img src="assets/logo_mlquantify-white.svg" alt="mlquantify logo">
34
34
  <h4 align="center">A Python Package for Quantification</h4>
35
35
 
36
36
  ___
@@ -41,7 +41,7 @@ ___
41
41
 
42
42
  ## Latest Release
43
43
 
44
- - **Version 0.1.3**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
44
+ - **Version 0.1.11**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
45
45
  - In case you need any help, refer to the [User Guide](https://luizfernandolj.github.io/mlquantify/user_guide.html).
46
46
  - Explore the [API documentation](https://luizfernandolj.github.io/mlquantify/api/index.html) for detailed developer information.
47
47
  - See also the library in the pypi site in [pypi mlquantify](https://pypi.org/project/mlquantify/)
@@ -73,7 +73,6 @@ ___
73
73
  | **Model Selection** | Criteria and processes used to select the best model, such as grid-search for the case of quantification|
74
74
  | **Evaluation Metrics** | Specific metrics used to evaluate quantification performance, (e.g., AE, MAE, NAE, SE, KLD, etc.). |
75
75
  | **Evaluation Protocols** | Evaluation protocols used, based on sampling generation (e.g., APP, NPP, etc.).. |
76
- | **Plotting Results** | Tools and techniques used to visualize results, such as the protocol results.|
77
76
  | **Comprehensive Documentation** | Complete documentation of the project, including code, data, and results. |
78
77
 
79
78
  ___
@@ -84,8 +83,8 @@ This code first loads the breast cancer dataset from _sklearn_, which is then sp
84
83
 
85
84
  ```python
86
85
  from mlquantify.methods import EMQ
87
- from mlquantify.evaluation.measures import absolute_error, mean_absolute_error
88
- from mlquantify.utils import get_real_prev
86
+ from mlquantify.metrics import MAE, NRAE
87
+ from mlquantify.utils import get_prev_from_labels
89
88
 
90
89
  from sklearn.ensemble import RandomForestClassifier
91
90
  from sklearn.datasets import load_breast_cancer
@@ -103,14 +102,14 @@ model.fit(X_train, y_train)
103
102
 
104
103
  #Predict the class prevalence for X_test
105
104
  pred_prevalence = model.predict(X_test)
106
- real_prevalence = get_real_prev(y_test)
105
+ real_prevalence = get_prev_from_labels(y_test)
107
106
 
108
107
  #Get the error for the prediction
109
- ae = absolute_error(real_prevalence, pred_prevalence)
110
- mae = mean_absolute_error(real_prevalence, pred_prevalence)
108
+ mae = MAE(real_prevalence, pred_prevalence)
109
+ nrae = NRAE(real_prevalence, pred_prevalence)
111
110
 
112
- print(f"Absolute Error -> {ae}")
113
111
  print(f"Mean Absolute Error -> {mae}")
112
+ print(f"Normalized Relative Absolute Error -> {nrae}")
114
113
  ```
115
114
 
116
115
  ___
@@ -129,13 +128,6 @@ ___
129
128
 
130
129
  ## Documentation
131
130
 
132
- ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/index.html)
133
-
134
- - [Methods](https://github.com/luizfernandolj/mlquantify/wiki/Methods)
135
- - [Model Selection](https://github.com/luizfernandolj/mlquantify/wiki/Model-Selection)
136
- - [Evaluation](https://github.com/luizfernandolj/mlquantify/wiki/Evaluation)
137
- - [Plotting](https://github.com/luizfernandolj/mlquantify/wiki/Plotting)
138
- - [Utilities](https://github.com/luizfernandolj/mlquantify/wiki/Utilities)
139
-
131
+ ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/)
140
132
 
141
133
  ___
@@ -1,4 +1,4 @@
1
- <h1 align="center">MLQuantify</h1>
1
+ <img src="assets/logo_mlquantify-white.svg" alt="mlquantify logo">
2
2
  <h4 align="center">A Python Package for Quantification</h4>
3
3
 
4
4
  ___
@@ -9,7 +9,7 @@ ___
9
9
 
10
10
  ## Latest Release
11
11
 
12
- - **Version 0.1.3**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
12
+ - **Version 0.1.11**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
13
13
  - In case you need any help, refer to the [User Guide](https://luizfernandolj.github.io/mlquantify/user_guide.html).
14
14
  - Explore the [API documentation](https://luizfernandolj.github.io/mlquantify/api/index.html) for detailed developer information.
15
15
  - See also the library in the pypi site in [pypi mlquantify](https://pypi.org/project/mlquantify/)
@@ -41,7 +41,6 @@ ___
41
41
  | **Model Selection** | Criteria and processes used to select the best model, such as grid-search for the case of quantification|
42
42
  | **Evaluation Metrics** | Specific metrics used to evaluate quantification performance, (e.g., AE, MAE, NAE, SE, KLD, etc.). |
43
43
  | **Evaluation Protocols** | Evaluation protocols used, based on sampling generation (e.g., APP, NPP, etc.).. |
44
- | **Plotting Results** | Tools and techniques used to visualize results, such as the protocol results.|
45
44
  | **Comprehensive Documentation** | Complete documentation of the project, including code, data, and results. |
46
45
 
47
46
  ___
@@ -52,8 +51,8 @@ This code first loads the breast cancer dataset from _sklearn_, which is then sp
52
51
 
53
52
  ```python
54
53
  from mlquantify.methods import EMQ
55
- from mlquantify.evaluation.measures import absolute_error, mean_absolute_error
56
- from mlquantify.utils import get_real_prev
54
+ from mlquantify.metrics import MAE, NRAE
55
+ from mlquantify.utils import get_prev_from_labels
57
56
 
58
57
  from sklearn.ensemble import RandomForestClassifier
59
58
  from sklearn.datasets import load_breast_cancer
@@ -71,14 +70,14 @@ model.fit(X_train, y_train)
71
70
 
72
71
  #Predict the class prevalence for X_test
73
72
  pred_prevalence = model.predict(X_test)
74
- real_prevalence = get_real_prev(y_test)
73
+ real_prevalence = get_prev_from_labels(y_test)
75
74
 
76
75
  #Get the error for the prediction
77
- ae = absolute_error(real_prevalence, pred_prevalence)
78
- mae = mean_absolute_error(real_prevalence, pred_prevalence)
76
+ mae = MAE(real_prevalence, pred_prevalence)
77
+ nrae = NRAE(real_prevalence, pred_prevalence)
79
78
 
80
- print(f"Absolute Error -> {ae}")
81
79
  print(f"Mean Absolute Error -> {mae}")
80
+ print(f"Normalized Relative Absolute Error -> {nrae}")
82
81
  ```
83
82
 
84
83
  ___
@@ -97,13 +96,6 @@ ___
97
96
 
98
97
  ## Documentation
99
98
 
100
- ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/index.html)
101
-
102
- - [Methods](https://github.com/luizfernandolj/mlquantify/wiki/Methods)
103
- - [Model Selection](https://github.com/luizfernandolj/mlquantify/wiki/Model-Selection)
104
- - [Evaluation](https://github.com/luizfernandolj/mlquantify/wiki/Evaluation)
105
- - [Plotting](https://github.com/luizfernandolj/mlquantify/wiki/Plotting)
106
- - [Utilities](https://github.com/luizfernandolj/mlquantify/wiki/Utilities)
107
-
99
+ ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/)
108
100
 
109
101
  ___
@@ -0,0 +1 @@
1
+ 0.1.11
@@ -274,7 +274,7 @@ def validate_data(quantifier,
274
274
  else:
275
275
  out = X, y
276
276
  elif not no_val_X and no_val_y:
277
- out = check_array(X, input_name="X", **check_params)
277
+ out = check_array(X, input_name="X", dtype=None, **check_params)
278
278
  elif no_val_X and not no_val_y:
279
279
  out = _check_y(y, **check_params)
280
280
  else:
@@ -286,12 +286,12 @@ def validate_data(quantifier,
286
286
  check_X_params, check_y_params = validate_separately
287
287
  if "estimator" not in check_X_params:
288
288
  check_X_params = {**default_check_params, **check_X_params}
289
- X = check_array(X, input_name="X", **check_X_params)
289
+ X = check_array(X, input_name="X", dtype=None, **check_X_params)
290
290
  if "estimator" not in check_y_params:
291
291
  check_y_params = {**default_check_params, **check_y_params}
292
292
  y = check_array(y, input_name="y", **check_y_params)
293
293
  else:
294
- X, y = check_X_y(X, y, **check_params)
294
+ X, y = check_X_y(X, y, dtype=None, **check_params)
295
295
  out = X, y
296
296
 
297
297
  return out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlquantify
3
- Version: 0.1.10
3
+ Version: 0.1.11
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -30,7 +30,7 @@ Dynamic: maintainer
30
30
  Dynamic: requires-dist
31
31
  Dynamic: summary
32
32
 
33
- <h1 align="center">MLQuantify</h1>
33
+ <img src="assets/logo_mlquantify-white.svg" alt="mlquantify logo">
34
34
  <h4 align="center">A Python Package for Quantification</h4>
35
35
 
36
36
  ___
@@ -41,7 +41,7 @@ ___
41
41
 
42
42
  ## Latest Release
43
43
 
44
- - **Version 0.1.3**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
44
+ - **Version 0.1.11**: Inicial beta version. For a detailed list of changes, check the [changelog](#).
45
45
  - In case you need any help, refer to the [User Guide](https://luizfernandolj.github.io/mlquantify/user_guide.html).
46
46
  - Explore the [API documentation](https://luizfernandolj.github.io/mlquantify/api/index.html) for detailed developer information.
47
47
  - See also the library in the pypi site in [pypi mlquantify](https://pypi.org/project/mlquantify/)
@@ -73,7 +73,6 @@ ___
73
73
  | **Model Selection** | Criteria and processes used to select the best model, such as grid-search for the case of quantification|
74
74
  | **Evaluation Metrics** | Specific metrics used to evaluate quantification performance, (e.g., AE, MAE, NAE, SE, KLD, etc.). |
75
75
  | **Evaluation Protocols** | Evaluation protocols used, based on sampling generation (e.g., APP, NPP, etc.).. |
76
- | **Plotting Results** | Tools and techniques used to visualize results, such as the protocol results.|
77
76
  | **Comprehensive Documentation** | Complete documentation of the project, including code, data, and results. |
78
77
 
79
78
  ___
@@ -84,8 +83,8 @@ This code first loads the breast cancer dataset from _sklearn_, which is then sp
84
83
 
85
84
  ```python
86
85
  from mlquantify.methods import EMQ
87
- from mlquantify.evaluation.measures import absolute_error, mean_absolute_error
88
- from mlquantify.utils import get_real_prev
86
+ from mlquantify.metrics import MAE, NRAE
87
+ from mlquantify.utils import get_prev_from_labels
89
88
 
90
89
  from sklearn.ensemble import RandomForestClassifier
91
90
  from sklearn.datasets import load_breast_cancer
@@ -103,14 +102,14 @@ model.fit(X_train, y_train)
103
102
 
104
103
  #Predict the class prevalence for X_test
105
104
  pred_prevalence = model.predict(X_test)
106
- real_prevalence = get_real_prev(y_test)
105
+ real_prevalence = get_prev_from_labels(y_test)
107
106
 
108
107
  #Get the error for the prediction
109
- ae = absolute_error(real_prevalence, pred_prevalence)
110
- mae = mean_absolute_error(real_prevalence, pred_prevalence)
108
+ mae = MAE(real_prevalence, pred_prevalence)
109
+ nrae = NRAE(real_prevalence, pred_prevalence)
111
110
 
112
- print(f"Absolute Error -> {ae}")
113
111
  print(f"Mean Absolute Error -> {mae}")
112
+ print(f"Normalized Relative Absolute Error -> {nrae}")
114
113
  ```
115
114
 
116
115
  ___
@@ -129,13 +128,6 @@ ___
129
128
 
130
129
  ## Documentation
131
130
 
132
- ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/index.html)
133
-
134
- - [Methods](https://github.com/luizfernandolj/mlquantify/wiki/Methods)
135
- - [Model Selection](https://github.com/luizfernandolj/mlquantify/wiki/Model-Selection)
136
- - [Evaluation](https://github.com/luizfernandolj/mlquantify/wiki/Evaluation)
137
- - [Plotting](https://github.com/luizfernandolj/mlquantify/wiki/Plotting)
138
- - [Utilities](https://github.com/luizfernandolj/mlquantify/wiki/Utilities)
139
-
131
+ ##### API is avaliable [here](https://luizfernandolj.github.io/mlquantify/api/)
140
132
 
141
133
  ___
@@ -1 +0,0 @@
1
- 0.1.10
File without changes
File without changes
File without changes