Machine Learning Algorithms for Integrating IoT Sensor into a Smart Irrigation system