incerto.shift.KSShiftDetector

incerto.shift.KSShiftDetector#

class incerto.shift.KSShiftDetector[source]#

Bases: BaseShiftDetector

One-dimensional Kolmogorov–Smirnov test (per feature, max statistic).

__init__()#

Methods

__init__()

fit(reference_loader)

Fit the detector on reference (source) distribution.

load(path)

Load a detector from a file.

load_state_dict(state)

Load detector state from a dictionary.

save(path)

Save detector state to a file.

score(test_loader)

Compute shift score between reference and test distributions.

state_dict()

Return a dictionary containing the detector's state.