Machine Learning-Based Gas Risk Prediction System Using Random Forest and Django Framework
DOI:
https://doi.org/10.62643/Keywords:
Machine Learning, Random Forest, Gas Prediction, Environmental Monitoring, Django Web Application, Data Analysis, Predictive Modeling, Air Quality, Risk Assessment, IoT Data ProcessingAbstract
Environmental monitoring has become increasingly important due to rising pollution
levels and the growing need for safety in industrial and urban environments. Hazardous
gases such as methane (CH₄), carbon dioxide (CO₂), and ammonia (NH₃) pose significant
risks to human health and safety when present in high concentrations. This project
presents a machine learning-based gas risk prediction system developed using the Django
web framework and the Random Forest algorithm.
The system is designed to predict risk levels based on gas concentration data provided
through uploaded datasets or manual input. It integrates a user-friendly web interface
with a backend machine learning model, enabling users to train models dynamically and
perform real-time predictions. The application consists of several modules, including user
authentication, dataset upload, model training, and prediction.Users can register and log
in securely using Django’s built-in authentication system. Once authenticated, users can
upload CSV datasets containing gas concentration values such as methane, carbon
dioxide, and ammonia, along with corresponding risk labels. The system processes the
dataset using the Pandas library, extracts relevant features, and trains a Random Forest
classifier. The trained model is then saved using Joblib for future predictions.
The prediction module allows users to input gas concentration values manually. The
system loads the trained model and predicts the associated risk level, which may
represent safe, moderate, or hazardous conditions. The prediction results are stored in the
database for future analysis and tracking.The Random Forest algorithm is chosen due to
its robustness, ability to handle nonlinear data, and high accuracy in classification tasks.
It works by constructing multiple decision trees and combining their outputs to improve
prediction reliability
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.













