Local learning techniques for modeling, prediction and control