incerto.shift.EnergyShiftDetector

incerto.shift.EnergyShiftDetector#

class incerto.shift.EnergyShiftDetector[source]#

Bases: BaseShiftDetector

Energy distance – Szekely & Rizzo, 2013.

__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.