mlquantify 0.1.5__py3-none-any.whl → 0.1.7__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.
mlquantify/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  import pandas
4
4
 
5
5
  from . import base
6
- from . import model_selection
6
+ #from . import model_selection
7
7
  from . import plots
8
8
  from . import classification
9
9
  from . import evaluation
@@ -1,4 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
+ from logging import warning
2
3
  import numpy as np
3
4
  from typing import Generator, Tuple
4
5
  from tqdm import tqdm
@@ -77,18 +78,11 @@ class Protocol(ABC):
77
78
  Generator[np.ndarray, np.ndarray]
78
79
  A generator that yields the indices for each split.
79
80
  """
80
- indices = np.arange(X.shape[0])
81
- for idx in self._split_indices_masks(X, y):
82
- indexes = indices[idx]
83
- yield indexes
84
-
85
- def _split_indices_masks(self, X: np.ndarray, y: np.ndarray) -> Generator[Tuple[np.ndarray, np.ndarray]]:
86
81
  for idx in self._iter_indices(X, y):
82
+ if len(idx) > len(X):
83
+ warning(f"Batch size {len(idx)} exceeds dataset size {len(X)}. Replacement sampling will be used.")
84
+ yield idx
87
85
 
88
- mask = np.zeros(X.shape[0], dtype=bool)
89
- mask[idx] = True
90
-
91
- yield mask
92
86
 
93
87
  @abstractmethod
94
88
  def _iter_indices(self, X, y):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mlquantify
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Quantification Library
5
5
  Home-page: https://github.com/luizfernandolj/QuantifyML/tree/master
6
6
  Maintainer: Luiz Fernando Luth Junior
@@ -1,4 +1,4 @@
1
- mlquantify/__init__.py,sha256=Q9jCEkG0EJoHXukrxh194mhO_Yfu-BZPRfjpQ4T1XlQ,978
1
+ mlquantify/__init__.py,sha256=EzRAX5TpVjDLP_Z9RG98xMhMGVckcYDHxwaZLrSKZjA,979
2
2
  mlquantify/base.py,sha256=hJ9FYYNGeO5-WJlpJpsUiu_LQL1fimvZPPNsKptxN7w,19196
3
3
  mlquantify/model_selection.py,sha256=rPR4fwwxuihzx5Axq4NhMOeuMBzpoC9pKp5taYNt_LY,12678
4
4
  mlquantify/plots.py,sha256=9XOhx4QXkN9RkkiErLuL90FWIBUV2YTEJNT4Jwfy0ac,12380
@@ -6,7 +6,7 @@ mlquantify/classification/__init__.py,sha256=3FGf-F4SOM3gByUPsWdnBzjyC_31B3Mtzuo
6
6
  mlquantify/classification/methods.py,sha256=yDSbpoqM3hfF0a9ATzKqfG9S-44x-0Rq0lkAVJKTIEs,5006
7
7
  mlquantify/evaluation/__init__.py,sha256=x1grng0n_QeZpVBU8-pwagYdBMkbMRILtrp1qk_bLvk,447
8
8
  mlquantify/evaluation/measures.py,sha256=fIKyxxlD8em3oaj4u_BeXmNyUQG_A0vXWY8APPgNoJ0,6579
9
- mlquantify/evaluation/protocol.py,sha256=__tzRyqW4cJz4Fl87TInf7dXxIJ6bSaYaSaw-SdkNmM,10365
9
+ mlquantify/evaluation/protocol.py,sha256=uVWHlnC_A_EX0Eki800Lkau9ZsyNundXoYtp7797ipI,10195
10
10
  mlquantify/methods/__init__.py,sha256=ya3Mn7bcz2r3oaIT7yVR4iJkAfgEAwF4xDK54C0rZ7U,536
11
11
  mlquantify/methods/aggregative.py,sha256=F5Z-tGA9OcZgMBLKOeaos6wIgvvnDeriZ4y0TyMpDrc,39051
12
12
  mlquantify/methods/meta.py,sha256=mBunCc_PFLdmrs5sf5MDc8TbO3VFpLAmxV2y2VDNjY8,19052
@@ -16,7 +16,7 @@ mlquantify/methods/threshold_optimization.py,sha256=NYGKbYvtfmiBeU8wpTiFCdURkijc
16
16
  mlquantify/utils/__init__.py,sha256=logWrL6B6mukP8tvYm_UPEdO9eNA-J-ySILr7-syDoc,44
17
17
  mlquantify/utils/general.py,sha256=wKJSmwF1KfSlSrDm0KTf92FMvB62BBOxf2Se9HyeWYE,8668
18
18
  mlquantify/utils/method.py,sha256=RL4vBJGl5_6DZ59Bs62hdNXI_hnoDIWilMMyMPiOjBg,12631
19
- mlquantify-0.1.5.dist-info/METADATA,sha256=bBEPfQhD4FYz9K4XsFCikSefsqo6JsNjqEPxTOW-Fv0,5166
20
- mlquantify-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- mlquantify-0.1.5.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
22
- mlquantify-0.1.5.dist-info/RECORD,,
19
+ mlquantify-0.1.7.dist-info/METADATA,sha256=pypNPQ7SLiHSzhZaoDB-Cy2K0XESL8DNIvn74eZ3slw,5166
20
+ mlquantify-0.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ mlquantify-0.1.7.dist-info/top_level.txt,sha256=tGEkYkbbFElwULvqENjam3u1uXtyC1J9dRmibsq8_n0,11
22
+ mlquantify-0.1.7.dist-info/RECORD,,