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
Return then SKLearn object.
Methods
Return the configuration of the LDA.
SkLDA.fit
(data, labels)Fit the LDA.
SkLDA.from_config
(cls, config)Deserialize from an object.
Return True if the discriminator has been trained on data.
SkLDA.predict
(data)Wrap the predict method of the LDA.