Prof. Selvaraj S, Department Of Computer Applications, DCSMAT, Vagamon
Introduction
Machine Learning sounds complicated, but the basic idea is simple: It shows a computer’s past data and let it find the pattern. In agriculture, those examples are earlier seasons, and the pattern we want is how much field produce and what the crop will sell for.

The data behind the ML Models:
The data come from the public government agricultural sources and it was arranged into two separate sets, one for yield and one for price. It covers the crop type, soil details, temperature, rainfall, humidity, past market trends and the region-based data. Before training, the data was cleaned, scaled to a common range and encoded so the computer could read text values such as crop yield and crop names.
Choosing the Machine Learning Algorithm:
Two well – known python tools were used: XGBoost and Scikit-learn. XGBoost builds many small decision trees, where each new tree corrects the mistakes of the earlier ones. This works well on tabular form data. The data was split into two types, training part for learning the machine and testing part for checking the results on unseen data.
State Wise Models:
Farming in Tamil Nadu is very different from farming in Punjab. For this reason, the system first looks for a model trained on the farmer’s own state. If none of them exist, it quietly falls back to a general model. This idea keeps the answers more relevant to local conditions.
What we learned:
Testing with many sample data or inputs give better results, and the answers came back almost instantly. The biggest lesson is that good data preparation and data pre-processing matter as much as the algorithm itself.