States in machine learning models
A machine learning model, at a high level, can be seen as a mathematical function, y = f(x). We provide the input data and train the model. However, the model can perform differently based on the following things:
- Input data: The quality of input data, features extracted from the input data, volume of the input data, and so on
- Hyperparameters: Learning rate, randomness to avoid bias and overfitting, cost functions, and many more
As these things impact the performance of the model, if they are used as states during serving, scaling can be a challenge, as well as consistency in response to customers.
Now we will look at some cases of how a machine learning model can have states.
Using input data as states
A machine learning algorithm can be designed in such a way that the data used during training is used as states for the model. This can be done in the following two ways:
- Some artificial data is generated to enhance...