Bug
The g_test statistical drift detector raises a ValueError when the
reference and current datasets have different sample sizes.
Reproduction
import pandas as pd
from evidently.legacy.calculations.stattests.g_stattest import _g_stat_test
from evidently.legacy.core import ColumnType
reference = pd.Series(["a"] * 500 + ["b"] * 500)
current = pd.Series(["a"] * 50 + ["b"] * 50)
_g_stat_test(reference, current, ColumnType.Categorical, 0.05)
Bug
The
g_teststatistical drift detector raises aValueErrorwhen thereference and current datasets have different sample sizes.
Reproduction