Skip to content

During my internship, I worked on a project called a capstone, where I analyzed a lot of data about crops and how they grow. I used this data to build computer programs that can predict how well crops will grow in different conditions. By doing this, I learned how to use data to help farmers make better decisions about farming.

Notifications You must be signed in to change notification settings

iamashishwasnik/Crop-Prediction-project

Repository files navigation

README.md

Crop Yield Prediction Project

This repository contains the code and data for a project focused on predicting crop yields based on various agricultural factors. This was my capstone project during my internship, where I worked on developing predictive models to optimize agricultural production.

Picture1

Dataset Information

The dataset used in this project contains information related to agricultural factors and crop yield. It includes data such as state names, crop types, nutrient levels (N, P, K), pH levels, weather conditions (rainfall, temperature), area in hectares, production in tons, and yield per hectare. The dataset was obtained from [provide data source if available].

Data Preprocessing

The preprocessing pipeline included the following steps:

  1. Data Cleaning:

    • Handled missing values by either imputing them or removing rows/columns with missing data.
    • Removed irrelevant columns such as 'Unnamed: 0' or other identifiers.
    • Ensured data consistency and uniformity by standardizing formats and addressing any inconsistencies.
  2. Exploratory Data Analysis (EDA):

    • Visualized the distribution of states, crop types, and production by state using bar charts and pie charts.
    • Explored relationships between different agricultural factors and crop yield using correlation analysis and visualizations like histograms and heatmaps.
  3. Feature Engineering:

    • Encoded categorical variables using techniques like Label Encoding or One-Hot Encoding.
    • Scaled numerical features to handle skewness and ensure uniformity in feature scales.
  4. Data Splitting:

    • Split the dataset into training and testing sets to facilitate model training and evaluation.
  5. Model Building and Evaluation:

    • Built predictive models using machine learning algorithms such as Linear Regression, Decision Tree Regressor, Random Forest Regressor, and K Neighbors Regressor.
    • Evaluated model performance using metrics like R-squared score, mean squared error (MSE), and mean absolute error (MAE).
  6. Data Transformation:

    • Reverted numerical data back into categorical format as needed for better interpretation or downstream analysis.

Conclusion

This preprocessing pipeline ensures that the dataset is cleaned, processed, and prepared for model training, enabling the development of accurate predictive models for crop yield prediction.

For detailed code implementation, refer to the Jupyter Notebook files provided in this repository.

Note: Replace file paths and specific details with appropriate information relevant to your project setup.

About

During my internship, I worked on a project called a capstone, where I analyzed a lot of data about crops and how they grow. I used this data to build computer programs that can predict how well crops will grow in different conditions. By doing this, I learned how to use data to help farmers make better decisions about farming.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published