Efficient Machine Learning in Dynamic Environments