Solution: This simple example illustrates a classifier hierarchy where a detector is followed by a classifier

Hierarchical classifiers combine several separately trained classifiers by decision-level rules. A commonly used example is a detector-classifier cascade where only the data samples identified as targets by the detector are processed by the classifier.
This may be useful when we want to protect our classes from outliers. Instead of building a discriminant that would classify all possible values of a new sample vector, we define the region in the feature space where the data might be using a detector. The discriminant will be trained only in this area.

Given a two class problem, a Gaussian model is trained on the all data, the reject option requires that the estimated Gaussian rejects 10\% of the data.

Note that since the target class fruit was not present in the original data, all data points are used. Next, we need to train a discriminant between both classes. Here, for example, a mixture of Gaussian with 3 components per class:

Now we can construct the cascade pipeline. We first provide the top-level classifier executed on all data samples (for us, the detector pd). Then, we specify what decision passes to the next stage (here fruit) and which classifier will be executed on such samples. Finally, we visualize the cascade decisions: