{'fraction_non_alphanumeric': 0.024497487437185928, 'fraction_numerical': 0.019472361809045227, 'mean_word_length': 5.057034220532319, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Smart Agriculture Prediction System for Vegetables Grown in Sri Lanka

Agriculture planning plays a dominant role in the economic growth and food security of agriculture-based countries such as Sri Lanka. Even though agriculture plays a vital role, there are still several major complications to be addressed. Some of the major complications are lack of knowledge about yield and price resulting in the farmers selecting crops based on experience. Machine learning has a great potential to solve these complications. To this end, this paper proposes a novel system comprises of a mobile application, SMS (Short Message Service), and API (Application Programming Interface) with yield prediction, price prediction, and crop optimization. Several machine learning algorithms were used for yield and price predictions while a generic algorithm was used to optimize crops. The yield was predicted considering the environmental factors while the price was predicted considering supply and demand, import and export, and seasonal effect. To select the best suitable crops to cultivate, the output of yield and price prediction have been used. Yield prediction has been implemented using elastic net, ridge, and multilinear regression. R2 of yield prediction is varied from 0.74 to 0.89 while RMSE value is between 15.69 and 35.05. Price prediction has been implemented using the algorithms of Gradient Boosting Tree, Random Forest, Facebook Prophet, and R2 is varied from 0.72 to 0.92 while RMSE value is between 26.81 and 140.72. Crop optimization has been implemented using the genetic algorithm.