Exploring keyed prediction use cases
In this section, we will discuss the necessity of keyed prediction. First of all, we want to demonstrate some cases along with code when the input prediction mapping can be jumbled up. Then, we will discuss some applications of using keyed prediction.
There are many cases when the input/output mapping can be jumbled up. Some of these cases are as follows:
- Multi-threaded programming: We use multiple threads during prediction using the same machine and the threads finish in an arbitrary order
- Multiple instances of the same model running asynchronously: As the models run asynchronously, they may finish in any order, giving rise to the jumbling up of the prediction order
Let’s discuss these two cases along with examples in the following subsections.
Multi-threaded programming
To get faster responses, we take advantage of multi-threaded programming. To make machine learning predictions, we can use multi-threaded programming...