Forest Fire Prediction System gives the most accurate predictions of when fire can take place. Project made for Software Engineering Lab 2023.
- Forest Fire Prediction is a Supervised Machine Learning Model. This model is trained is using Rregression and Classification algorithms.
- Dataset used is Algerian Forest Fires from UCI link . The datatset contains forest fire observations and data of regions of Algeria: the Bejaia region and the Sidi Bel-Abbes region.
- The timeline of this dataset is from June 2012 to September 2012. In this project, we focused on whether certain weather features could predict forest fires in these regions using few Machine Learning algorithms.
- Data Collection
- Data Pre-Processing
- Exploratory Data Analysis
- Feature Engineering
- Feature Selection
- Model Building
- Model Selection
- Hyperparameter Tuning
- Flask framework
- Model deployment
- For regression analysis FWI(Fire weather Index) considered as dependent feature because it highly correlated with classes variable with more than 90% correlation.
Model Used:
- Linear regression
- Lasso Regression
- Ridge Regression
- Decision tree
- Random forest
- K-Nearest Neighbour regressor
- Support Vector Regressor
- For Classification Classes is dependent feature which is a Binary Classification(fire, not fire)
Model Used:
- Logistic Regression
- Decision Tree
- Random Forest
- K-Nearest Neighbour
- XGboost
- HyperParameter Tuning Randomized Gridsearch CV is done for top 2 models for both Regression and Classification.
- For Classification
Stratified Kfold Cross-Validation metrics
is used based best Mean CV Accuracy Model is used for Model Deployment. - For Regression
R2 score metrics
is used to select best model The R2 score is one of the performance evaluation measures for regression-based machine learning models.
- Importing the Flask module and creating a Flask web server from the Flask module.
- Create an object app in flask class with
__name__
which represents current app.py file. - Create
/
route to render default page html. /predict_api
route for api testing usingPostman
- Create a route
/predict
/predictR
to get user input for Classification and Regression respectively. - Run the flask app with
app.run()
code.
Try out the project, follow these steps:
-
Clone the repository
git clone https://github.com/vaniseth/Forest-Fire-Prediction-System.git
-
Change the directory to the project directory.
cd Forest-Fire-Prediction-System
-
Install the dependencies.
pip install -r requirements.txt
-
Run the app.py to start the app
flask run