AIxFP: Crop Prediction using Machine Learning
Brought to you by: Saturdays.AI --- Use it freely under CC License --- #ai4all #ai4good
1. Introduction
Life on the farm is tiring and full of effort because a lot of tasks have to be done within the day to achieve the ultimate goal, for example, transplanting seedlings, checking the crops for insects or beetles, checking on their livestock, and many more. However, hard-working is not the only factor that influences production and the rate of return. Choosing the right types of the crop remains equally important.
Different crops need a different type of soils, different types and amounts of nutrients, and different types and amounts of water. By selecting the right crop for the given soil conditions and climate, one can optimise yields and save water requirements for irrigation.
When a farmer would like to know what kind of crops grow well, they could place sensors in the soil that measure the concentration of various chemicals, and the local weather station delivers accurate information on the current temperature, humidity and average rainfall. There is also some related dataset that shows for many combinations of these values what kind of crop would grow well. Obviously, it would be very laborious to look up these values in the large table and it’s easy to make an unreliable decision without a great deal of experience about it. Ideally, the computer would do this. In other words, given data from the sensors on the farm, the farmers will get a recommendation for crops that should grow well from the computer.
In this notebook, you'll learn how to use machine learning to automate these recommendations with fast speed and incredible accuracy.
2. ❓ How to use this notebook
You don't need to know how to programme in Python (the programming language in which we wrote this notebook). The only thing you will need to do is to run the following cells –each small section of the code in the notebook– one at the time and in order. We have left comments in the code to help you understand the functions and steps being executed within each cell. Comments appear in green and are preceded by #s; these bits of text are ignored by the processor
- To run a cell, hover over it and click on the ▶ button in the upper left corner. While it is running you the button will show a rotating circle.
- If you want to interrupt its execution, you can click again on the button.
- If the processing of a cell has an output, this will appear right after the cell when it finishes running.
❗ Important ❗ So that the execution doe