mlquantify 0.1.5__tar.gz → 0.1.7__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.
- {mlquantify-0.1.5/mlquantify.egg-info → mlquantify-0.1.7}/PKG-INFO +1 -1
- mlquantify-0.1.7/VERSION.txt +1 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/__init__.py +1 -1
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/evaluation/protocol.py +4 -10
- {mlquantify-0.1.5 → mlquantify-0.1.7/mlquantify.egg-info}/PKG-INFO +1 -1
- mlquantify-0.1.5/VERSION.txt +0 -1
- {mlquantify-0.1.5 → mlquantify-0.1.7}/MANIFEST.in +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/README.md +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/base.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/classification/__init__.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/classification/methods.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/evaluation/__init__.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/evaluation/measures.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/__init__.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/aggregative.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/meta.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/mixture_models.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/non_aggregative.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/methods/threshold_optimization.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/model_selection.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/plots.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/utils/__init__.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/utils/general.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify/utils/method.py +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify.egg-info/SOURCES.txt +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify.egg-info/dependency_links.txt +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify.egg-info/requires.txt +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/mlquantify.egg-info/top_level.txt +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/setup.cfg +0 -0
- {mlquantify-0.1.5 → mlquantify-0.1.7}/setup.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.7
|
|
@@ -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):
|
mlquantify-0.1.5/VERSION.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.1.5
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|