Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

SkLDA

class SkLDA(lda)[source]

A wrapper for the scikit-learn linear discriminant analysis.

Note

This class requires that scikit-learn is installed.

Parameters:

lda (LinearDiscriminantAnalysis) – The sklearn linear discriminant analysis. This may be a trained or an untrained discriminator.

Raises:

DataProcessorError – If SKlearn could not be imported.

Attributes

SkLDA.discriminator

Return then SKLearn object.

Methods

SkLDA.config()

Return the configuration of the LDA.

SkLDA.fit(data, labels)

Fit the LDA.

SkLDA.from_config(cls, config)

Deserialize from an object.

SkLDA.is_trained()

Return True if the discriminator has been trained on data.

SkLDA.predict(data)

Wrap the predict method of the LDA.