Skip to content

Commit 7015f06

Browse files
Add missing DEFAULT_SIGMA in MMD unit tests
1 parent 8b09aa4 commit 7015f06

File tree

1 file changed

+13
-3
lines changed
  • frouros/tests/unit/detectors/data_drift/batch/distance_based

1 file changed

+13
-3
lines changed

frouros/tests/unit/detectors/data_drift/batch/distance_based/test_mmd.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
"""Test MMD."""
22

33
from functools import partial
4-
from typing import Any, Optional, Tuple
4+
from typing import (
5+
Any,
6+
Optional,
7+
Tuple,
8+
)
59

610
import numpy as np
711
import pytest
@@ -182,7 +186,10 @@ def test_mmd_chunk_size_initialization_valid(
182186
X_ref = np.random.normal(0, 1, 100)
183187
X_test = np.random.normal(0, 1, 100)
184188

185-
kernel = partial(rbf_kernel, sigma=DEFAULT_SIGMA)
189+
kernel = partial(
190+
rbf_kernel,
191+
sigma=DEFAULT_SIGMA,
192+
)
186193

187194
detector = MMD(
188195
kernel=kernel,
@@ -213,7 +220,10 @@ def test_mmd_chunk_size_invalid(
213220
:param chunk_size: chunk size to test
214221
:type chunk_size: Any
215222
"""
216-
kernel = partial(rbf_kernel, sigma=0.5)
223+
kernel = partial(
224+
rbf_kernel,
225+
sigma=DEFAULT_SIGMA,
226+
)
217227

218228
with pytest.raises((TypeError, ValueError)):
219229
MMD(

0 commit comments

Comments
 (0)