valor-lite 0.34.1__py3-none-any.whl → 0.34.2__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.
Potentially problematic release.
This version of valor-lite might be problematic. Click here for more details.
- valor_lite/classification/computation.py +3 -1
- valor_lite/classification/numpy_compatibility.py +13 -0
- {valor_lite-0.34.1.dist-info → valor_lite-0.34.2.dist-info}/METADATA +1 -1
- {valor_lite-0.34.1.dist-info → valor_lite-0.34.2.dist-info}/RECORD +6 -5
- {valor_lite-0.34.1.dist-info → valor_lite-0.34.2.dist-info}/WHEEL +0 -0
- {valor_lite-0.34.1.dist-info → valor_lite-0.34.2.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
from numpy.typing import NDArray
|
|
3
3
|
|
|
4
|
+
import valor_lite.classification.numpy_compatibility as npc
|
|
5
|
+
|
|
4
6
|
|
|
5
7
|
def _compute_rocauc(
|
|
6
8
|
data: NDArray[np.float64],
|
|
@@ -56,7 +58,7 @@ def _compute_rocauc(
|
|
|
56
58
|
np.maximum.accumulate(tpr, axis=1, out=tpr)
|
|
57
59
|
|
|
58
60
|
# compute rocauc
|
|
59
|
-
rocauc =
|
|
61
|
+
rocauc = npc.trapezoid(x=fpr, y=tpr, axis=1)
|
|
60
62
|
|
|
61
63
|
# compute mean rocauc
|
|
62
64
|
mean_rocauc = rocauc.mean()
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from numpy.typing import NDArray
|
|
3
|
+
|
|
4
|
+
try:
|
|
5
|
+
_numpy_trapezoid = np.trapezoid # numpy v2
|
|
6
|
+
except AttributeError:
|
|
7
|
+
_numpy_trapezoid = np.trapz # numpy v1
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def trapezoid(
|
|
11
|
+
x: NDArray[np.float64], y: NDArray[np.float64], axis: int
|
|
12
|
+
) -> NDArray[np.float64]:
|
|
13
|
+
return _numpy_trapezoid(x=x, y=y, axis=axis) # type: ignore - NumPy compatibility
|
|
@@ -4,9 +4,10 @@ valor_lite/profiling.py,sha256=TLIROA1qccFw9NoEkMeQcrvvGGO75c4K5yTIWoCUix8,11746
|
|
|
4
4
|
valor_lite/schemas.py,sha256=pB0MrPx5qFLbwBWDiOUUm-vmXdWvbJLFCBmKgbcbI5g,198
|
|
5
5
|
valor_lite/classification/__init__.py,sha256=8MI8bGwCxYGqRP7KxG7ezhYv4qQ5947XGvvlF8WPM5g,392
|
|
6
6
|
valor_lite/classification/annotation.py,sha256=0aUOvcwBAZgiNOJuyh-pXyNTG7vP7r8CUfnU3OmpUwQ,1113
|
|
7
|
-
valor_lite/classification/computation.py,sha256=
|
|
7
|
+
valor_lite/classification/computation.py,sha256=CyfeDuxupQXnoRL7t3F6UMll03ZXhNRfZSq0s8QrzAc,12256
|
|
8
8
|
valor_lite/classification/manager.py,sha256=cZ6-DKao59QqF0JF_U26tBoydpCElAAH8rRyX_Kc6bc,16618
|
|
9
9
|
valor_lite/classification/metric.py,sha256=_mW3zynmpW8jUIhK2OeX4usdftHgHM9_l7EAbEe2N3w,12288
|
|
10
|
+
valor_lite/classification/numpy_compatibility.py,sha256=roqtTetsm1_HxuaejrthQdydjsRIy-FpXpGb86cLh_E,365
|
|
10
11
|
valor_lite/classification/utilities.py,sha256=eG-Qhd213uf2GXuuqsPxCgBRBFV-z_ADbzneF1kE368,6964
|
|
11
12
|
valor_lite/object_detection/__init__.py,sha256=Ql8rju2q7y0Zd9zFvtBJDRhgQFDm1RSYkTsyH3ZE6pA,648
|
|
12
13
|
valor_lite/object_detection/annotation.py,sha256=x9bsl8b75yvkMByXXiIYI9d9T03olDqtykSvKJc3aFw,7729
|
|
@@ -33,7 +34,7 @@ valor_lite/text_generation/llm/instructions.py,sha256=fz2onBZZWcl5W8iy7zEWkPGU9N
|
|
|
33
34
|
valor_lite/text_generation/llm/integrations.py,sha256=-rTfdAjq1zH-4ixwYuMQEOQ80pIFzMTe0BYfroVx3Pg,6974
|
|
34
35
|
valor_lite/text_generation/llm/utilities.py,sha256=bjqatGgtVTcl1PrMwiDKTYPGJXKrBrx7PDtzIblGSys,1178
|
|
35
36
|
valor_lite/text_generation/llm/validators.py,sha256=Wzr5RlfF58_2wOU-uTw7C8skan_fYdhy4Gfn0jSJ8HM,2700
|
|
36
|
-
valor_lite-0.34.
|
|
37
|
-
valor_lite-0.34.
|
|
38
|
-
valor_lite-0.34.
|
|
39
|
-
valor_lite-0.34.
|
|
37
|
+
valor_lite-0.34.2.dist-info/METADATA,sha256=hHwCwG9A_jQzo4tTo_LABVpK3eaFvWExPqEgpT1nQLQ,5062
|
|
38
|
+
valor_lite-0.34.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
39
|
+
valor_lite-0.34.2.dist-info/top_level.txt,sha256=9ujykxSwpl2Hu0_R95UQTR_l07k9UUTSdrpiqmq6zc4,11
|
|
40
|
+
valor_lite-0.34.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|