AI and Machine Learning for IoT