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.
BaseDiscriminator¶
- class BaseDiscriminator[source]¶
An abstract base class for serializable discriminators used in the
DiscriminatorNode
data action nodes.This class allows developers to implement their own discriminators or wrap discriminators from external libraries which therefore ensures that the discriminator fits in the data processing chain. This class defines an interface for discriminator objects. Subclasses must implement the following methods:
predict()
: called in theDiscriminator
data-action class to predict labels from the input level-one data.config()
: produces the config file to serialize and deserialize the discriminator.is_trained()
: indicates if the discriminator is trained, i.e., fit to training data.
Attributes
Return the discriminator object that is wrapped.
Methods
Return the configuration of the discriminator.
BaseDiscriminator.from_config
(config)Create a discriminator from the configuration.
Return True if this discriminator has been trained on data.
The function used to predict the labels of the data.