mlquantify 0.1.0__tar.gz → 0.1.1__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 (27) hide show
  1. {mlquantify-0.1.0 → mlquantify-0.1.1}/PKG-INFO +3 -3
  2. {mlquantify-0.1.0 → mlquantify-0.1.1}/README.md +1 -1
  3. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/threshold_optimization.py +9 -11
  4. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/model_selection.py +1 -1
  5. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify.egg-info/PKG-INFO +3 -3
  6. {mlquantify-0.1.0 → mlquantify-0.1.1}/setup.py +1 -1
  7. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/__init__.py +0 -0
  8. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/base.py +0 -0
  9. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/classification/__init__.py +0 -0
  10. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/classification/methods.py +0 -0
  11. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/evaluation/__init__.py +0 -0
  12. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/evaluation/measures.py +0 -0
  13. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/evaluation/protocol.py +0 -0
  14. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/__init__.py +0 -0
  15. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/aggregative.py +0 -0
  16. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/meta.py +0 -0
  17. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/mixture_models.py +0 -0
  18. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/methods/non_aggregative.py +0 -0
  19. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/plots.py +0 -0
  20. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/utils/__init__.py +0 -0
  21. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/utils/general.py +0 -0
  22. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify/utils/method.py +0 -0
  23. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify.egg-info/SOURCES.txt +0 -0
  24. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify.egg-info/dependency_links.txt +0 -0
  25. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify.egg-info/requires.txt +0 -0
  26. {mlquantify-0.1.0 → mlquantify-0.1.1}/mlquantify.egg-info/top_level.txt +0 -0
  27. {mlquantify-0.1.0 → mlquantify-0.1.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: mlquantify
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -58,7 +58,7 @@ pip install mlquantify
58
58
  If you only want to update, run the code below:
59
59
 
60
60
  ```bash
61
- pip install --update mlquantify
61
+ pip install --upgrade mlquantify
62
62
  ```
63
63
 
64
64
  ___
@@ -27,7 +27,7 @@ pip install mlquantify
27
27
  If you only want to update, run the code below:
28
28
 
29
29
  ```bash
30
- pip install --update mlquantify
30
+ pip install --upgrade mlquantify
31
31
  ```
32
32
 
33
33
  ___
@@ -1,5 +1,6 @@
1
1
  from abc import abstractmethod
2
2
  import numpy as np
3
+ import warnings
3
4
  from sklearn.base import BaseEstimator
4
5
 
5
6
  from ..base import AggregativeQuantifier
@@ -570,13 +571,18 @@ class MS2(ThresholdOptimization):
570
571
  - The median threshold value for cases meeting the condition (float).
571
572
  - The median true positive rate for cases meeting the condition (float).
572
573
  - The median false positive rate for cases meeting the condition (float).
573
-
574
+
574
575
  Raises
575
576
  ------
576
577
  ValueError
577
- If no cases satisfy the condition `|TPR - FPR| > 0.25` or if the
578
- input arrays are empty or have mismatched lengths.
578
+ If no cases satisfy the condition `|TPR - FPR| > 0.25`.
579
+ Warning
580
+ If all TPR or FPR values are zero.
579
581
  """
582
+ # Check if all TPR or FPR values are zero
583
+ if np.all(tprs == 0) or np.all(fprs == 0):
584
+ warnings.warn("All TPR or FPR values are zero.")
585
+
580
586
  # Identify indices where the condition is satisfied
581
587
  indices = np.where(np.abs(tprs - fprs) > 0.25)[0]
582
588
  if len(indices) == 0:
@@ -589,14 +595,6 @@ class MS2(ThresholdOptimization):
589
595
 
590
596
  return (threshold, tpr, fpr)
591
597
 
592
-
593
-
594
-
595
-
596
-
597
-
598
-
599
-
600
598
 
601
599
  class PACC(ThresholdOptimization):
602
600
  """
@@ -131,7 +131,7 @@ class GridSearchQ(Quantifier):
131
131
  model: Quantifier,
132
132
  param_grid: dict,
133
133
  protocol: str = 'app',
134
- n_prevs: int = None,
134
+ n_prevs: int = 100,
135
135
  n_repetitions: int = 1,
136
136
  scoring: Union[List[str], str] = "ae",
137
137
  refit: bool = True,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: mlquantify
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -58,7 +58,7 @@ pip install mlquantify
58
58
  If you only want to update, run the code below:
59
59
 
60
60
  ```bash
61
- pip install --update mlquantify
61
+ pip install --upgrade mlquantify
62
62
  ```
63
63
 
64
64
  ___
@@ -6,7 +6,7 @@ here = pathlib.Path(__file__).parent.resolve()
6
6
 
7
7
  long_description = (here / 'README.md').read_text(encoding='utf-8')
8
8
 
9
- VERSION = '0.1.0'
9
+ VERSION = '0.1.1'
10
10
  DESCRIPTION = 'Quantification Library'
11
11
 
12
12
  # Setting up
File without changes