iq_readout.two_state_classifiers.GaussMixLinearClassifier#

class GaussMixLinearClassifier(params)[source]#

Read gmlda.md and TwoStateLinearClassifier documentation

__init__(params)#

Loads params to this TwoStateLinearClassifier.

Parameters:
params

The structure of the dictionary must be

{
    0: {"param1": float, ...},
    1: {"param1": float, ...}
}

Methods

fit(shots_0, shots_1[, n_bins])

Fits the given data to extract the best parameters for classification.

from_yaml(filename)

Load the TwoStateClassifier from YAML file.

pdf_0(z)

Returns \(p(z|0)\).

pdf_0_projected(z_proj)

Returns \(p_{proj}(z_{proj}|0)\).

pdf_1(z)

Returns \(p(z|1)\).

pdf_1_projected(z_proj)

Returns \(p_{proj}(z_{proj}|1)\).

predict(z[, p_0])

Classifies the given data to 0 or 1 using maximum-likelihood classification, which is defined by

project(z)

Returns the projection of the given IQ data to the \(\mu_0 - \mu_1\) axis.

to_yaml(filename)

Stores parameters in a YAML file.

Attributes

params

Returns the parameters required to set up the classifier.

params_proj

Returns the parameters for the projected PDFs, computed from params.

statistics

Returns dictionary with general statistical data: