An adaptive machine learning algorithm for the resource-constrained classification problem. (March 2023)