A machine learning model to predict soil fertility based on elemental soil analysis
Raw Data is published on kaggle
- N - ratio of Nitrogen (NH4+) content in soil
- P - ratio of Phosphorous (P) content in soil
- K - ratio of Potassium (K) content in soil
- ph - soil acidity (pH)
- ec - electrical conductivity
- oc - organic carbon
- S - sulfur (S)
- zn - Zinc (Zn)
- fe - Iron (Fe)
- cu - Copper (Cu)
- Mn - Manganese (Mn)
- B - Boron (B)
- fertility: categorical (0 "Less Fertile", 1 "Fertile", 2 "Highly Fertile")
- Lack of Data about our region
- Lack of some classes
- Lack of experience in agriculutral science
- Searched for a dataset from another country
- Creating additional instances for the least appearing class
- monitored by an experienced specialist
- Import liberaries and modules
- Naive approuch with RandomForestClassifier and raw data(accuracy = 88%)
- Data Exploration for modified data
- Choose a model
- SupportVectorClassifier
- RandomForestClassifier
- GaussianNB
- KNeighborsClassifier
- DecisionTreeClassifier
- GridSearch
- Train a RandomForestClassifier (accuracy = 97%)
- Save the model