A machine learning framework for LES closure terms