AI and Machine Learning for the IoT