0% found this document useful (0 votes)
131 views

B12 - Crop Yield Prediction Using Machine Learning

This document discusses using machine learning algorithms to predict crop yields. It begins with an overview of machine learning and why crop yield prediction is important for farmers. It then describes the process of collecting climate data, preprocessing the data, splitting it into training and test sets, and using four algorithms - deep neural networks, logistic regression, support vector machines, and random forests - to make predictions. Accuracy is evaluated for each algorithm, with random forests found to have the highest accuracy of 99.08% for this dataset, making it best suited for crop yield prediction.

Uploaded by

Ramesh Daravath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views

B12 - Crop Yield Prediction Using Machine Learning

This document discusses using machine learning algorithms to predict crop yields. It begins with an overview of machine learning and why crop yield prediction is important for farmers. It then describes the process of collecting climate data, preprocessing the data, splitting it into training and test sets, and using four algorithms - deep neural networks, logistic regression, support vector machines, and random forests - to make predictions. Accuracy is evaluated for each algorithm, with random forests found to have the highest accuracy of 99.08% for this dataset, making it best suited for crop yield prediction.

Uploaded by

Ramesh Daravath
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Crop Yield Prediction Using

Machine Learning
Under the guidance of
K Praveen Kumar
Assistant Professor
What is Machine Learning ?
• Machine learning is the study of
computer algorithms that improve
automatically through experience and
by the use of data.
• It is basically where we train the
computers through the data, create
models and predict the future values
using different algorithms.
• Ability to mimic humans and replace
certain monotonous tasks which
require some intelligence.
• Examples: Traffic Prediction, Self-
driving cars.
Why Crop Yield Prediction?

• Agriculture is one of the major revenue


producing sectors of India and a source of
survival.
• Numerous seasonal, economic and biological
patterns influence the crop production but
unpredictable changes in these patterns lead to a
great loss to farmers.
• These risks can be reduced when suitable
approaches are employed on data related to soil
type, temperature, atmospheric pressure,
humidity and crop type, moisture.
• Whereas, crop forecasting can be predicted by
deriving useful insights from these agricultural
data that aids farmers to decide on the crop they
would like to plant for the forthcoming year
leading to maximum profit.
How do we predict??
 Machine Learning techniques to predict crop yield.
 We provide an easy User Interface.
 Increasing the accuracy by using different algorithms which give the best crop yield prediction.
Here the algorithms used are
i. Deep Neural Networks
ii. Logistic Regression
iii. Support Vector Machine
iv. Random Forest
 By analyzing the different climatic parameters
Process
 First we take the data set including the input parameters like temperature,
Moisture, humidity and rainfall. ( recom.csv)
 The we load the data into the model.
 Next, we would be preprocessing the data by adding some target values, threshold values to the real-time
data.

 We add the target values as bio conditions and soil type in the arrays.
 We will be encoding the null points in the data by using onehotencoder which is an inbuilt function.
 The final data that is preprocessed is saved into another csv file named “finalyield.csv”.
 Now, we split the data into training and testing. i.e., 20% Testing data and 80% Training data .

 We then train the model with the algorithms (DNN, Random forest, Logistic regression and Support Vector
Machine).
Deep Neural Networks
Algorithm
• Deep learning is a class of machine
learning algorithms that uses
multiple layers to progressively
extract higher-level features from the
raw input.
• Neural networks are formed through
neurons .

• Images composed of 28 X28 pixels


which makes up 784 pixel
• Applications for neural network are
facial recognition ,Music
composition.
Prediction Using Deep neural Networks
 We import the model in keras which uses “relu” and sigmoid kernels.

 Accuracy and loss is obtained by using the ‘score’ function.

 Result :---
Logistic Regression

• Logistic Regression is a Machine


Learning algorithm which is used for
the classification problems.
• It is a predictive analysis algorithm
and based on the concept of
probability.
• The simplest form of logistic
regression is binary or binomial
logistic regression in which the target
or dependent variable can have only
2 possible types either 1 or 0.
Prediction Using Logistic Regression
 We use scikit-learn to import the logistic regression algorithm.

 Accuracy is predicted using the y_test and x_test data sets.

 We then import our values into the model for predicting the soil yield based on the given parameters.
Support Vector Machine
Algorithm

• Classifier that is designed by the


hyper plane.
• It is a representation of examples as
points of different categories are
separated by gap as wide as possible.
• Segregates the data where the
distance between the nearest points
and linear hyperplane is margins.
Prediction using Support Vector Machine

 We import SVM model which is an inbuilt function in scikit learn.


 Here SVC() function uses different kernels like linear , hyperbola, sigmoid.

 We predict the accuracy by using the score function.


Random Forest
Algorithm

• An ensemble classifier using


many decision tree models.
• Can be used for classification or
Regression.
• Accuracy and variable
importance information is
provided with the results.
• The attributes from this set
creates the best possible split
using the gini index to develop a
decision tree model.
Prediction Using Random Forest
 We are using scikit learn ensemble model to import the random forest classifier.

 We predict the accuracy by using score function.

 Highest Accuracy obtained –

Accuracy -----
How do we decide which algorithm suits best ??

 Different algorithms works best for different types of data sets.


 So, here for our data set.. We have used four different algorithms and we have
predicted accuracy.
 Random forest is giving the highest accuracy of 99.08% which is best suitable for
our data set.
 We can use confusion matrix to show our data in the form of matrix.
Thank you
A.Dheeraj (221710402006)
B.Sowmya (221710402009)
G. Krishna Margali (221710402013)
P.Sreeja (221710402048)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy