Skip to content

A machine learning model that predicts soil fertility based on elemental soil analysis. The repository includes all relevant code, data sets, and documentation, as well as a detailed description of the model's methodology and performance metrics. Moreover, the repository could contain data visualizations or other supplementary tools.

Notifications You must be signed in to change notification settings

NouraAlgohary/Soil-Quality-Fertility-Prediction

Repository files navigation

ML---Soil-Quality

A machine learning model to predict soil fertility based on elemental soil analysis

The-5-Components-of-Healthy-Soil-1024x682

Requirments

Requirments

Data

Data Source

Raw Data is published on kaggle

Atrributes

  • 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")

Resource/Situational Constraints

  • Lack of Data about our region
  • Lack of some classes
  • Lack of experience in agriculutral science

Process followed

  • Searched for a dataset from another country
  • Creating additional instances for the least appearing class
  • monitored by an experienced specialist

Code

  1. Import liberaries and modules
  2. Naive approuch with RandomForestClassifier and raw data(accuracy = 88%)
  3. Data Exploration for modified data
  4. Choose a model
    • SupportVectorClassifier
    • RandomForestClassifier
    • GaussianNB
    • KNeighborsClassifier
    • DecisionTreeClassifier
  5. GridSearch
  6. Train a RandomForestClassifier (accuracy = 97%)
  7. Save the model

About

A machine learning model that predicts soil fertility based on elemental soil analysis. The repository includes all relevant code, data sets, and documentation, as well as a detailed description of the model's methodology and performance metrics. Moreover, the repository could contain data visualizations or other supplementary tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published