Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

Okes2024/Predicting-Groundwater-Iron-Concentration-from-Borehole-Data

Domain:

environment and energy
Creator:
Oke
Host:
This study aimed to model and predict iron concentrations in groundwater within Yenagoa, Bayelsa State, Nigeria, using machine learning techniques. It focused on evaluating spatial variability and determining the most influential predictors to support groundwater quality management. # Predicting Groundwater Iron Concentration from Borehole Data **Introduction:** This analysis develops a machine learning model to predict iron concentration in groundwater using borehole data (latitude, longitude, and town). We proceed through all key steps from data preprocessing to model evaluation and interpretation. The workflow is as follows: 1. **Data Preprocessing:** Encode categorical variables (town names) and normalize numeric features if needed. 2. **Exploratory Data Analysis (EDA):** Investigate distributions and correlations in the data to identify trends. 3. **Model Training:** Train two regression models (a linear regression and a random forest) to predict iron concentration. 4. **Model Evaluation:** Evaluate model performance using metrics like Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and R². 5. **Feature Importance:** Determine which features (e.g., town or spatial coordinates) most strongly influence the predictions. 6. **Spatial Patterns:** Visualize any geographic patterns or clustering of iron concentrations on a map. Each step is detailed in the sections below, accompanied by visualizations and a performance comparison table. ## 1. Data Preprocessing **Encoding Categorical Data:** The dataset contains 50 boreholes, each with a town name (categorical) and coordinates. We convert the town category into numerical features using **one-hot encoding**, which creates a binary indicator column for each town. One-hot encoding ensures that the model treats each town independently without implying an ordinal relationship. For example, if there are five towns, we create five new columns (one per town) with values 0 or 1 indicating the town for each borehole. The original “town” column is then dropped. This transformation allows the linear and tree-based models to utilize town information effectively. **Normalizing Numeric Features:** Latitude and longitude are numeric continuous variables. Feature normalization or standardization i …

Visit

github.com