Onion Yield Prediction Based on Machine Learning

Indian economy is mostly based on agriculture but the price of each vegetables and fruits varies in day today life. In recent days, the price of onion is increasing wisely, to predict the future price of onion by using past data and also the water level need for a particular crop using current dataset and also by using climate changes. Using Machine learning, collect the dataset of weather report and past and current priceof vegetables (e.g. onion) and water level prediction of plants. By analyzing these dataset the price of vegetables and the water level required for particular plant on particular day according to the climate change are analyzed and predicted. By using machine learning algorithm like Support vector machine, stemming, and tokenization. This will be helpful for the cultivators to crop a plant according to the weather and it will be useful when the water level needed for the particular plant is known previously. And these will also help to bring customer and farmer will gain more. The water level will also help to enhance the harvest yield and also will produce good crops all the time. The cultivator will gain more and the harvesting will also be more when compared to other systems.


Introduction
Vegetables from farmers are in advanced minded due to climatic changes are risker than division and indirectly outline the farmers who routinely does the hardwork for the yield of products [7,8,9]. For the past decade ago there is a high demand in price prediction [3,5]. The livestock farmers are in issues under harvest of vegetables[1,3,4, 10,11,12]. Due to this farmers are gaining low income [2].Onion and vegetables are more important to lead a healthy life. If vegetable price steadily increases poor people can't buy it [8,9,10]. So, they can't lead a healthy life.
Price prediction is a useful idea for consumers as well as farmers [3,4,5]. Here, Machine learning helps businesses to set a pricing manner that develops loyalty among people[1,2,3]. Yielding forecast is a important issue in agriculture. Vegetable value changes according to weather conditions [9,14,15,20]. By using Machine learning algorithm we can predict the price of vegetables next day by comparing it with previous price rate of vegetables [27,28,29,30,31,32,33]. For this we used the following algorithms like Support Vector Machine, Stemming, and Tokenization.

Literature survey
[1] The proposed system is about the collection of massive dataset collection, the problems in collecting the dataset and also includes collecting the dataset both in the internet as well as in the traditional way. The massive development in computer technology brings need of most of the data so they produced the system of collecting more number of dataset.
[2] The project predicted the market price of vegetables with the help of back propagation neural network and genetic algorithm network model. They have collected about 84 models and performed training and testing.The integrated model predicted and produced good results.
[3] They proposed the prediction of price only and have used back propagation neural network the vegetable taken was tomato and they have analyzed the features of tomato and predicted the price. The result was taken in the form of percentage.
[4]This paper predict the values of shares so that the buyers will be able to acquires their shares in the appropriate time. They have used error back propagation algorithm to train the neural network so that the price of stock price will be predicted shortly.
[5] They proposed the prediction of price and they have taken tomato as an example and have used back propagation neural network and they have analyzed the features of tomato and predicted the price to help the cultivators as well as the government. The result was taken in the form of percentage.
[8] By collecting the dataset of weather and climatic conditions the weather is prediction in this paper. They have used back propagation neural network for initialization and ANN based method. [9] This paper describes about the evolution of bigdata it consist of economics of big data.

Proposed System
In proposed system, price prediction and water level management has been implemented using Machine Learning Algorithm figure 3.1. This algorithm has been implemented because of its accuracy. The preprocessing of data is done using Stemming and Tokenization. The linear regression algorithm is used to predict the price and water required for a particular plant for a specific period.

.A) Dataset collection
Data collection is a process to collect the data in the form of structured and unstructured data to make a database. Here the dataset is collecting the data about weather, onion prize, and water level. The data stored as the database and the machine is trained after pre-processing.
3.2.B) Preprocessing of data Data pre-processing is a way of converting data from the raw form to a much more usable or desired form. To make the data more significantby standardizing, rescaling,finalizing, one hot encoding, and label encoding.
Here's the list of contents for this module.

.D) Training the machine
Machine learning is a field of computer science that defines making the machine to learn from past historical data and after training and testing correct output is predicted in the form of pictorial representation or in the theoretical representation.By using the dataset that we have collected the machine is trained and tested for producing the output.
3.5.E) Classification Firstly, Load Python packages and the data are pre-processed. After preprocessing the subset of the data is collected. Then splitting the data into training and testing dataset. After dividing the data into training and testing the data is tested and trained then build a random forest classifier. Then predict the price of onion then check the accuracy of the model. Finally, check the feature and importance's.

3.6F) Literature Results
The sample result shown in

.G) Prediction analysis
The main execution of the algorithm to analyze and predict the prize and water level for the given dataset. In the existing projects they have predicted the price of vegetable in monthly basis but here the prices are predicted in the daily basis.
The outcomes are as per the following figure 3.3, Figure 3.3 sample price prediction

Conclusion
By predicting and analysis of demand and water level management and weather prediction plays a vital role in cultivating the crops. If we predict the weather and water level it will help the cultivators to cultivate the crops. Then the major part of our project is price prediction will increase the yield if their yield increases means farmers will gain more than the present income this will also help the people to manage their expenses if the price was predicted earlier means they will buy the vegetables before and the consumption also increases. This project will give the accurate price so that there is no deviation in the thoughts of people about the price increase. This will definitely help the people to manage the vegetable expenses it can be implemented for all the vegetables as of now onion is one of the most demanded vegetables so we have particularly taken that if it is implemented for all the vegetable means it will be most useful to both the consumers and the farmers.