mlquantify 0.1.0__py3-none-any.whl → 0.1.1__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.
@@ -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
  ___
@@ -1,6 +1,6 @@
1
1
  mlquantify/__init__.py,sha256=Q9jCEkG0EJoHXukrxh194mhO_Yfu-BZPRfjpQ4T1XlQ,978
2
2
  mlquantify/base.py,sha256=hJ9FYYNGeO5-WJlpJpsUiu_LQL1fimvZPPNsKptxN7w,19196
3
- mlquantify/model_selection.py,sha256=deMdTKarMu4DtfSy6ucTIxQKj1yrC-x3nhBT77kMOtI,12679
3
+ mlquantify/model_selection.py,sha256=rPR4fwwxuihzx5Axq4NhMOeuMBzpoC9pKp5taYNt_LY,12678
4
4
  mlquantify/plots.py,sha256=9XOhx4QXkN9RkkiErLuL90FWIBUV2YTEJNT4Jwfy0ac,12380
5
5
  mlquantify/classification/__init__.py,sha256=3FGf-F4SOM3gByUPsWdnBzjyC_31B3MtzuolEuocPls,22
6
6
  mlquantify/classification/methods.py,sha256=yDSbpoqM3hfF0a9ATzKqfG9S-44x-0Rq0lkAVJKTIEs,5006
@@ -12,11 +12,11 @@ mlquantify/methods/aggregative.py,sha256=rL_xlX2nYECrxFSjBJNlxj6h3b-iIs7l_XgxIRS
12
12
  mlquantify/methods/meta.py,sha256=sZWQHUGkm6iiqujmIpHDL_8tDdKQ161bzD5mcpXLWEY,19066
13
13
  mlquantify/methods/mixture_models.py,sha256=si2Pzaka5Kbva4QKBzLolvb_8V0ZEjp68UBAiOwl49s,35166
14
14
  mlquantify/methods/non_aggregative.py,sha256=xaBu21TUtiYkOEUKO16NaNMwdNa6-SNjfBsc5PpIMyI,4815
15
- mlquantify/methods/threshold_optimization.py,sha256=P88VXG-czZiaHSHTGnzFmZVzm3SoJHnrmi60Zvv7IJU,33726
15
+ mlquantify/methods/threshold_optimization.py,sha256=Q7RcaFARF7G_AAHTl4PzmfVY-IUSSRv25Msg5-EXweU,33887
16
16
  mlquantify/utils/__init__.py,sha256=logWrL6B6mukP8tvYm_UPEdO9eNA-J-ySILr7-syDoc,44
17
17
  mlquantify/utils/general.py,sha256=Li5ix_dy19dUhYNgiUsNHdqqnSVYvznUBUuyr-zYSPI,7554
18
18
  mlquantify/utils/method.py,sha256=RL4vBJGl5_6DZ59Bs62hdNXI_hnoDIWilMMyMPiOjBg,12631
19
- mlquantify-0.1.0.dist-info/METADATA,sha256=6ud6gvzxxaQr7oZLD3fu3piid1ZHjJuHAQZzZeUw7Rs,4939
20
- mlquantify-0.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
21
- mlquantify-0.1.0.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
22
- mlquantify-0.1.0.dist-info/RECORD,,
19
+ mlquantify-0.1.1.dist-info/METADATA,sha256=k6YtSHV6sAYaQtInGV_N3a8irC6_cwWyHakRrMQZh9Q,4940
20
+ mlquantify-0.1.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
21
+ mlquantify-0.1.1.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
22
+ mlquantify-0.1.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5