Crop Price Prediction Using Machine Learning

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Volume 9, Issue 3, March – 2024 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAR2058

Crop Price Prediction using Machine Learning


1
Shivani Ashok Kotkar; 2Ishika Sachin Narkhede; 3Renuka Rajendra Shirsath; 4Dr. R. Naik
Computer Engineering Department Sanjivani College of Engineering, Kopargaon
Affiliated to-SPPU, Pune Kopargaon, India

Abstract:- Crop planning for the next season in of hiring machine learning in crop price prediction is its ability
agriculture is a difficult task for farmers because it is to handle complex and nonlinear relationships among
difficult to predict the price of the product in a particular multiple variables. Machine learning algorithms play a
season depending on the weather. Accurate and timely significant role in developing precise and efficient crop price
estimation of crop prices is important in making planting, prediction models. It facilitates informeddecision-making. Of
harvesting and marketing decisions. Crop prices cannot course, using machine learning for crop price prediction
be predicted accurately using crop price methods. This involves using a variety of techniques and methods
problem can be solved with machine learning models that appropriate to specific situations.
will predict crop prices, show crop analysis patterns and
present future situations to farmers. Farmers choose the II. PURPOSE OF PROPOSED SYSTEM
right crop to produce crops; this includes crop selection,
setting crop standards and storage. harvested crops  Machine learning models can analyze historical data,
provide sufficient information to estimate the appropriate weather patterns, and other relevant factors to predict crop
crop price as a business. It will be used for past, present yields. Farmers can use these predictions to make
and future rainfall as well as last year's value. Based on informed decisions about planting, harvesting, and
this framework, machine learning algorithms are used to resource allocation.
predict crop prices and produce accurate crop price  Farmers can use crop prediction models to anticipate
prediction results. It helps farmers and others in potential risks such as droughts, pests, and diseases. With
agriculture make better decisions about crops. With the this information, they can take proactive measures to
help of this survey, researchers will help find the best protect theircrops and reduce losses.
ideas and methods to predict crop prices using machine  Crop prediction systems align with the principles of
learning. precision agriculture, which involves fine-tuning farming
practices to maximize efficiency and minimize waste.
Keywords:- Market Analysis, Future Forecasting, Mahine  Machine learning models can offer customized
Learning, Crop Pattern. recommendations to farmers based on their specific
conditions and needs.
I. INTRODUCTION  These systems can also serve as educational tools, helping
farmers and agricultural students understand the complex
Have you ever wondered how farmers decide on the interactions between various factors affecting crop
prices for their crops? Well, with the help of machines and growth.
smart computer programs, we can now predict how much
crops might cost in the future. Here we will use some machine
learning algorithms and prediction model to predict the crop
prices. A prediction model is a mathematical orcomputational
tool that uses historical data, patterns, and relationships to
forecast future outcomes. Crop price prediction has emerged
as a powerful tool in agricultural sector. With advance data
analytics and machine learning techniques, predicting crop
prices has become more accurate and efficient. Machine
learning models can hold historical data, market trends,
weather patterns, and various other relevant factors to
forecast future crop prices with a considerable level of
accuracy. The process of crop price prediction using machine
learning typically involves data preprocessing, feature
engineering, model selection, model training, and model
evaluation. Various supervised and unsupervised learning
algorithms, such as regression models, time series analysis,
and deep learning techniques, can be used to predict crop
prices and produce accurate results. Oneof the key advantages

IJISRT24MAR2058 www.ijisrt.com 2698


Volume 9, Issue 3, March – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAR2058

A. System Architecture

Fig 1: System Architecture

 Data Collection: Crop prices, weather, farm information, The paper focuses on agriculture. As we all know,
etc. the most i mportant role in agriculture falls to farmers.
 Preprocessing: Cleaning, integrating and transforming When prices dr op after harvest, farmers face huge losses.
data for analysis. A country's GDP will be affected by changes in
 Feature Engineering: Select and design relevant features agricultural production. Crop cost estimation and
for prediction. evaluation is done to decide before plant ing a crop.
 Modelling: Use machine learning, time series analysis, or Predicting crop prices will help you make better decisions
deep learning models to make predictions. to minimize losses and manage the risk of price fl
 Training and evaluation: Train the model and measure per uctuation. In this article, we estimate the value of different
formance using metrics such as MAE and RMSE. crops by analyzing historical rainfall and WPI data. We
 Deployment: Deploy the model to the production environ use d ecision tree regressors (tracking machine learning
ment and provide the API/interface to the user. algorithm s) to analyze previous data and predict the value
 Monitor and Monitor: Monitor and update the model regu of new data and predict the value for the next twelve
larly to fix issues such as strategy drift. months.
 User Interface: Create a userfriendly interface for stakeho
lders with forecasting and visualization.  Conference/Journal: Published in 2021 in Computer
Science, Vellore Institute of Technology, Chennai, Tamil
Nadu, India.
III. LITERATURE SURVEY
 Paper Title: “Crop price prediction using machine
learning”
 Conference/Journal: Published in 2021 Department of
Information Technology, Sri Krishna College of  Author: Ganesh Sastry Kakaraparthi*1,
Technology, Coimbatore, India. B.V.A.N.S.S.Prabhakar Rao*2
 Paper Title: “Crop price prediction using supervised
machine learning algorithms” Agricultural planning plays an important role in the
economi c development of food security in agricultural
 Author: Ranjani Dhanapal 1, A AjanRaj 1, S
countries.
Balavinayagapragathish 1, J Balajji 1

IJISRT24MAR2058 www.ijisrt.com 2699


Volume 9, Issue 3, March – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAR2058

However, agriculture in India has gone through a  Here are Some Graphs of Outliers of the Crops in our
difficult phase due to lack of agricultural knowledge. Farmers Dataset:
someti mes and often do not know which crops are suitable to
grow depending on the soil quality and soil structure. The
system will take into account many factors such as weather
and soil conditions and ensure that the most suitable crop is
grown for. Crop forecasting can be used to reduce losses in
emergenc y situations. Farmers can use this system to
maximize crop yields when they grow well. The system also
includes crop pr ice forecasting; system, M.S.P. will
determine M.S.P. will be determined by the government.Help
estimate net 12 month cost based on M.S.P. and the previous
month's or previous month's price. It allows farmers to
calculate their income. According to crop forecas t can choose
suitable crop and earn more profit.

 Conference/Journal: Published in Department of E&C


Engineering P.E.S College of Engineering, Mandya India Fig 2: This is the Figure Showing Outliers of Arhar Crop,
Paper Title: “Crop price prediction using machine there are10 Outliers Present after we Implement the Code.
learningApproaches”
 Author: Dhanush Vishwakarma, Mahendra N, Ashwini,
Manjuraju M.R

India is the second most populous country in the world


and most of the people in India work in agriculture. Farmers
con tinue to replant old crops without trying new ones and use
fertilizers indiscriminately without knowing their content and
fertilizer. Therefore, this not only directly affects crop yield
but also leads to acidification of the soil and thus surface tre
atment. That's why we developed this system using machine
learning algorithms to improve the lives of farmers. Our sys
tem will show you the best crops for a given land depending
on the context and weather conditions. The system also prov
ides information about the content and amount of fertilize and
seeds required for planting. Therefore using our system,
farmers can grow new crops, increase their income and prev Fig 3: This is the Figure Showing Outliers of Bajra Crop,
ent soil pollution. there Are 0 Outliers Present After we Implement the Code

IV. METHODOLOGY So, in this way we get the graphs of outliers for all the
remaining crops and then we remove the outliers by
A. Data Collection: normalizing the data.
Here we have gathered historical data on crop prices
from reliable sources such as government agencies, C. Feature Selection:
commodity exchanges, agricultural market reports, etc. Here we have identified relevant features that may affect
crop prices, such as weather conditions during planting and
We have collected data on factors that might influence harvesting seasons, demand-supply dynamics, government
crop prices, such as weather data, crop yields, economic subsidies, etc.
indicators, global market trends, wpi etc.
We have performed feature engineering to create new
B. Data Preprocessing: features or transform existing ones if necessary to improve
Here we have performed data preprocessing by cleaning model performance.
thedata by removing any inconsistencies, missing values, or
outliers. Normalize or scale the data to ensure that all D. Model Selection:
variables are on a similar scale, which helps in model training. We have chosen Time Series model that is ARIMA. We
have considered the nature of the data (cross-sectional or
time-series), complexity of relationships, interpretability
requirements, and computational resources available when
selecting the model.

IJISRT24MAR2058 www.ijisrt.com 2700


Volume 9, Issue 3, March – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAR2058

E. Model Training:
We have split the data into training and testing sets.
Ensuring that the test set includes data from different time
periods to evaluate the model's generalization ability and the
trained the selected model on the training data using
appropriate techniques and algorithms.

F. Model Evaluation:
We have evaluated the trained models using appropriate
evaluation metrics such as Mean Absolute Error (MAE),
Mean Squared Error (MSE), Root Mean Squared Error
(RMSE), etc.

And then we have compared the performance of Fig 5: Next 6 Months Price Prediction for Bajra Crops
different models and select the one with the best performance
on thetest set.

G. Model Tuning:
We have done tuning for ARIMA model, in which we
havetuned p,d and q parameters. While tuning the model the
p, d and q value which is giving least AIC, that is being
considered as a tuned parameters. Model is once evaluated
with given p, d, q values.

H. Prediction:
Once the model is trained and evaluated satisfactorily,
weused it to make predictions on new or unseen data.

I. Deployment:
We have deployed the trained model into production Fig 6: Next 6 Months Price Prediction for Barley Crops
environment, ensuring scalability, reliability, and security.
We have deployed our model on website using Flask.

 Challenges

 Obtaining high-quality, reliable, and diverse datasets can


be challenging.
 Machine learning models may suffer from overfitting
(capturing noise in the data) or underfitting
(oversimplifying complex relationships) issues. Balancing
model complexity to avoid these problems while
capturing relevant features is crucial.
 Alternative/Substitute crop are also not considered.
 Deployment of time series is challenging due to version
Fig 7: Next 6 Months Price Prediction for Copra Crops
mismatch of stats model.
So, in this way we get the results for all the remaining
V. RESULT
crops.

VI. CONCLUSION

Crop price prediction represents a significant


advancement inthe field of agriculture and has the potential to
revolutionize the way farmers, policymakers, and
stakeholders make decisions.Through the utilization of
historical data, weather patterns, market dynamics, and
various other relevant features, machine learning models have
demonstrated their ability to offer accurate and timely
predictions of crop prices. This project's significance lies in
Fig 4: Next 6 Months Price Prediction for Arhar Crops its ability to providefarmers with valuable insights into the
future market trends, allowing them to make informed

IJISRT24MAR2058 www.ijisrt.com 2701


Volume 9, Issue 3, March – 2024 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165 https://doi.org/10.38124/ijisrt/IJISRT24MAR2058

decisions about planting, harvesting, and selling their crops.


Moreover when it integrated into decision-making processes,
can assist governments and organizations in developing
policies and strategies that promote food security and
sustainable agriculture. They can help in mitigating the
impact of price volatility, thus benefiting both producers and
consumers.

REFERENCES

[1]. Monali Ganesh Sastry Kakaraparthi, B.V.A. N. S. S.


Prabhakar Rao “CROP PRICE PREDICTION USING
MACHINE LEARNING”, June-2021 International
Research Journal of Modernization in Engineering
Technology and Science.
[2]. Ishita Ghutake, Ritesh Verma1, Rohit Chaudhari, and
Vidhate Amarsinh, “An intelligent Crop Price
Prediction using suitable Machine Learning
Algorithm”, ICACC- 2021.
[3]. Yung-Hsing Peng, Chin-Shun Hs and Po-Chuang
Huang, “Developing Crop Price Forecasting Service
Using Open Data from Taiwan Markets,” IEEE 2017.
[4]. Pooja More, Sachi Nene, “Crop Yield prediction using
advanced neural networks and machine learning
algorithms”, RTDE ,2017.
[5]. Monali Paul, Ashok Verma, “Analysis of crop yield
ratesusing data mining techniques to increase the yield
rates of farmers”, 2015 International Conference on
Computational Intelligence and Communication
Networks.

IJISRT24MAR2058 www.ijisrt.com 2702

You might also like