The dataset contains information related to soil composition and environmental factors in order to predict the suitable crop for a particular region.
The goal is to make a crop recommendation model.
There are 8 independent variables:
- N : Nitrogen content in the soil
- P : Phosphorus content in the soil
- K : Potassium content in the soil
- temperature : Temperature (in Celsius)
- humidity : Humidity (in %)
- ph : pH value of the soil
- rainfall : Rainfall in particular reason (in mm)
Target variable:
- Label: Crop suitable to grow in the particular region considering all the factors
- Data Preprocessing: The dataset is preprocessed to handle missing values, encode categorical variables, and scale numerical features.
- Feature Selection: Relevant features are selected for training the model.
- Model Selection: Various machine learning algorithms are evaluated, and the best performing algorithm is selected.
- Model Training: The selected algorithm is trained on the preprocessed dataset.
- Model Evaluation: The trained model is evaluated using appropriate evaluation metrics to assess its performance.
To use the trained model for prediction:
- Clone the repository to your local machine.
- Load the trained model using the provided file (model.pkl).
- Prepare input data with the same features used during model training.
- Use the loaded model to make predictions on the input data.