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 the Discriminator 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.



Return the discriminator object that is wrapped.

Sub-classes may not need to implement this method but can chose to if they are wrapping an object capable of discrimination.


abstract config()[source]#

Return the configuration of the discriminator.

Return type:

Dict[str, Any]

classmethod from_config(config)[source]#

Create a discriminator from the configuration.

Return type:


abstract is_trained()[source]#

Return True if this discriminator has been trained on data.

Return type:


abstract predict(data)[source]#

The function used to predict the labels of the data.