Abstract:
Climate variability in recent years has critically affected the usual aspects of human lives, where the agriculture sector can be considered as one of the most vulnerable. Sri Lanka is also facing these climate changes over the past few decades. It has resulted in rainfall pattern changes where the expected rain may not occur during the expected time and amount. The mismatch between the rainfall pattern and traditional seasonal cultivation schedule has critically affected the agricultural sustainability. Even with the current technological advancements, weather prediction is one of the most technically and scientifically challenging tasks. This paper presents a novel machine learning-based approach for predicting rainfall for precision agriculture in Sri Lanka and it can be recognized as the first attempt to validate machine learning models to predict the weather in Sri Lankan context for precision agriculture. By analyzing the nature of the weather in Sri Lanka, the relationship of weather attributes with agriculture, availability, and accessibility, seven attributes are selected including rain gauge, relative humidity, average temperature, wind speed, wind direction where solar radiation and ozone concentration are uniquely selected for Sri Lankan context. For the prediction model, cross-validated data are trained and tested with four machine learning algorithms: Multiple Linear Regression, K-Nearest Neighbors, Support Vector Machine, and Random Forest. Currently, Support Vector Machine, K-Nearest Neighbors models have achieved accuracies of 88.57%, 88.66%. Random Forest has been recognized as the best-fitted model with 89.16% accuracy. The results depict a significant accuracy in this novel approach for Sri Lankan weather prediction.