SingleComponentDistanceClassifier#

Module: exa.core.multistate_classifier.distance_classifier

class SingleComponentDistanceClassifier#

Bases: SingleComponentClassifier

Component classifier that assigns states based on distance to the average readout value of each state.

Attributes

LABEL

The label used as part of the observation name for this classifier.

MODEL_PARAMETERS

The names of the model parameters used by this classifier.

Methods

apply

Apply the distance classifier to data.

calibrate

Calibrate the distance classifier with data.

LABEL = 'distance_component_classifier'#

The label used as part of the observation name for this classifier.

MODEL_PARAMETERS: ClassVar[list[str]] = ['state_0_mean', 'state_1_mean', 'state_2_mean', 'inverse_assignment_error']#

The names of the model parameters used by this classifier.

apply(input_data, component, data_variable_label, component_override)#

Apply the distance classifier to data.

Updates the provided data with the classification results.

Parameters:
  • input_data (Dataset) – The dataset to classify.

  • component (str) – The component whose readout data to classify.

  • data_variable_label (str) – The data variable containing the raw readout.

  • component_override (dict[str, Any] | None) – The model parameters to use.

Return type:

None

calibrate(input_data, component, data_variable_label)#

Calibrate the distance classifier with data.

Parameters:
  • input_data (Dataset) – The labeled calibration dataset.

  • component (str) – The component to calibrate the classifier for.

  • data_variable_label (str) – The data variablecontaining the raw readout.

Returns:

The mapping of observation names to calibrated model parameters.

Return type:

dict[str, Any]

Inheritance

Inheritance diagram of exa.core.multistate_classifier.distance_classifier.SingleComponentDistanceClassifier