https://medium.com/@monocosmo77/understanding-stochastic-matching-part3-machine-learning-7eb7db8b05b2