# A Decision Support System for Crop Recommendation Using Machine Learning Classification Algorithms
## 3 Materials and Methods
### Proposed Model for Seasonal Crop Recommendation
#### 3.17.1 Phase I  
Dataset Description  
A detailed historical dataset has been collected from URL: [[https://data.world/thatzprem/agriculture-india](https://data.world/thatzprem/agriculture-india)]([https://data.world/thatzprem/agriculture-india](https://data.world/thatzprem/agriculture-india)) (accessed on 26 January 2024) with 246,091 sample records with 37 different crops such as Arhar, Bajra, Castor seed, Coriander, Cotton, Dry chiles, Dry gunger, Garlic, Gram, Groundnut, Horse-gram, Jowar, Jute, Linseed, Maize, Mesta, Moong, Niger seed, Onion, Other Rabi Pulsesm Other Kharif pulses, Paddy, Potato, Ragi, Rapeseeds and Mustard, Rice, Safflower, Sannhamp, Sesamum, Small millets, Sugarcane, Sunflower, Sweet potato, Tobacco, Turmeric, Urad, and Wheat. Also, the metadata of the dataset contains state, district, crop year, season, crop name, area, and production per hectare.  
The dataset is pre-processed to remove fields. Other Rabi pulses and Other Kharif pulses and removed records have empty locations. Then, the dataset was reduced to three districts, Koraput, Gajapati, and Rayagada, in Odisha State, which resulted in 1480 records. Figure 4 shows four different Agriculture Offices in three districts, Koraput, Gajapati, and Rayagada, in Odisha, where we have consulted the agriculture officers for their suggestions. We have also consulted experienced farmers from different areas of these districts and collected data on the crops and their productivity. We have combined both datasets and prepared a customized final dataset for analysis.  
Data Cleaning and Pre-Processing  
The collected data from different sources have been cleaned by removing the irrelevant fields and correcting erroneous data inputs and empty fields. Then, the data have been processed to change their formats to be suitable for analysis. Mostly, the data have been converted into Comma-Separated Values (CSV) format. Feature selection has been performed to select the best set of features and apply predictions. Then, finally, the dataset is obtained for analysis.  
Figure 4: Agriculture offices and Google Maps of GUNUPUR, PARALAKHEMUNDI, KORAPUT, and RAYAGADA.  
The cleaned and useful data are further divided into training and testing phases. A total of 80% of the data is used for training in a standard way and 20% is used for testing the model.  
Cloud Storage  
Nowadays, a smartphone device is available for common farmers. So, an Android application, \"Area-wise Seasonal Crop Recommendation\", is developed using Android Studio, Emulator, SDK, and Tools. Figure 6 shows a screenshot of the application that contains the crop's details and their relevant information. The application is tested for analyzing the crop dataset, which is in CSV file format using SMOTEs shown in the proposed model. A farmer can use our application interface using his Android smartphone, and it can present the suitable crop as per his field data, season, and water availability. He shall choose the specific location area available in the app and the present date to know the present season. Then, he shall go for the prediction option. This leads to executing different classification algorithms along with the SMOTE technology on these datasets. Also, different kernel functions are applied to fine-tune and improve the model's performance.  
Based on the rate of performance, a suitable classifier technique is chosen, which shall suggest the crops based on season for a specific area. Finally, the suggested crops shall be visualized in the farmer's mobile phone as per the area and season given.