Theoretical basis of machine learning