Project Report Forest Fire
Project Report Forest Fire
BACHELOR OF TECHNOLOGY
IN
Computer Science & Engineering
Submitted by :-
Alok Mishra (A40320002)
Sourav Sharma(A40320006)
Vasu Dev Ganda(A40320035)
Varun Kumar(A40420005)
2020-2024
Project Guide :-
Ms. Diksha Chawla (AP, CSE & CSIT Dept)
This is to certify that the Project work entitled “Algerian Forest Fire Classification
Web Application” submitted by Alok Mishra, Sourav Sharma, Vasu Dev Ganda, &
Varun Kumar in partial fulfillment for the requirements of the award of
BACHELOR OF TECHNOLOGY Degree in Computer Science & Engineering at
PDMU, Bahadurgarh, Haryana, is an authentic work carried out by them under my
supervision and guidance. To the best of my knowledge, the matter embodied in the
project has not been submitted to any other University / Institute for the award of
any Degree.
Supervisor/Guide
Ms. Diksha Chawla
AP, CSE & CSIT Dept.
Faculty of Engineering & Technology
DECLARATION BY THE CANDIDATE
We hereby declare that the work presented in this report entitled “Algerian Forest
Fire Classification Web Application”, in fulfilment of the requirement for the award
of the Degree BTech. in Computer Science & Engineering, submitted in CSE
Department, PDMU, Bahadurgarh, Haryana, is an authentic record of our own work
carried out during our degree under the guidance of Ms. Diksha Chawla. The work
reported in this has not been submitted by me for award of any other degree or
diploma.
We express our sincere gratitude to Mrs. KAVITA (Head, Department of CSE &
CSIT) and Ms. Diksha Chawla (Assistant Professor, Department of CSE & CSIT),
for their valuable guidance and timely suggestions during the entire duration of our
dissertation work, without which this work would not have been possible. We would
also like to convey our deep regards to all other faculty members who have bestowed
their great effort and guidance at appropriate times without which it would have
been very difficult on my part to finish this work.
ABSTRACT
This Project contains a number of methods through which we pass our data, methods be
like :-
1. Data Collection
2. Feature Engineering & EDA
3. Data Visualization
4. Model Creation
5. Model Accuracy Testing
6. Web Application Creation Using Flask
Most of the methods that we have used are with the help of python libraries(pandas,
NumPy, seaborn, matplotlib.pyplot, sklearn, confusion matrix) libraries in python. The
dataset includes 244 instances that regroup a data of two regions of Algeria,
namely the Bejaia region located in the northeast of Algeria and the Sidi Bel-abbes
region located in the northwest of Algeria.
The period from June 2012 to September 2012. The dataset includes 11 attributes
and 1 output attribute (class) The 244 instances have been classified into fire(138
classes) and not fire (106 classes) classes.
TABLE OF CONTENT
CERTIFICATE OF COMPLETION
DECLARATION BY THE CANDIDATES
ACKNOWLEDGEMENT
ABSTRACT
TABLE OF CONTENTS
Chapter 1: Introduction
Chapter 2: About Language Used
2.1. Python
2.2. Advantages Of Python
2.3. Applications Of Python
Chapter 3: Technical Details
3.1. Software Requirements
3.2. Importing Libraries
3.3. Hardware Requirements
Chapter 4: Attribute Information
Chapter 5: Data Cleaning
Chapter 6: Exploratory Data Analysis (EDA)
Chapter 7: Data Visualization
Chapter 8: Model Training & Testing
Chapter 9: Using The Pickle File for Creating Web Application
Chapter 10: Conclusion
References
Contribution
CHAPTER 1
INTRODUCTION
Data Set Information:
The dataset includes 244 instances that regroup a data of two regions of
Algeria,namely the Bejaia region located in the northeast of Algeria and the Sidi
Bel-abbes region located in the northwest of Algeria.
The period from June 2012 to September 2012. The dataset includes 11 attribues
and 1 output attribue (class) The 244 instances have been classified into fire(138
classes) and not fire (106 classes) classes.
CHAPTER 2
About Language Used
The project entitled as “Caste Based Crimes In India” is constructed using Python which
is described below :-
2.1 Python :-
Python is interpreted, high-level, general purpose programming language. Created by a
Dutch programmer, “Guido Van Rossum” and first released in 1991. Its implementation
began in 1989. Van Rossum shouldered sole responsibility for the project, as the lead
developer, until July 12, 2018, when he announced his ‘Permanent vacation’ from his
responsibilities as Python’s Benevolent Director for Life, a title the Python community
bestowed upon him to reflect his long-term commitment as the project’s chief decision-
maker. It supports multiple programming paradigms, including procedural, object-oriented
and functional programming. Python interpreters are available for many operating systems.
A nonprofit organisation, the “Python Software Foundation”, manages and directs
resources for Python development. Python is a general-purpose interpreted, interactive,
object-oriented, and high-level programming language. It was created by Guidovan
Rossum during 1985- 1990. Like Perl, Python source code is also available under the GNU
General Public License (GPL). Python 3.0 was releasedin2008.Althoughthis version is
supposed to be backward incompatible, later on many of its important features have been
back-ported to be compatiblewith version 2.7. Features Python is a high-level, interpreted,
interactive and object-oriented scripting language. Python is designed to be highly
readable. It uses English keywords frequently whereas
otherlanguagesusepunctuation,andithasfewer syntactic constructions than other languages.
Libraries: Python’s standard library is very extensive, offering a wide range of facilities as
indicated by the long table of contents listed below. The library contains built-in modules
(written in C) that provide access to system functionality such as file I/O that would
otherwise be inaccessible to Python programmers, as well as modules written in Python
that provide standardized solutions for many problems that occur in everyday
programming. Some of these modules are explicitly designed to encourage and enhance
the portability of Python programs by abstracting away platform-specifics into platform-
neutral APIs.
● Learning Ease & Support Available: Python offers excellent readability and
unclutteredsimple-to-learn syntax which helps beginners to utilize this programming
language. The code style guidelines, PEP 8, provide a set of rules to facilitate the
formatting of code. Additionally, the wide base of users and active developers has
resulted in a rich internet resource bank to encourage development and the continued
adoption of the language.
● Productivity and Speed: Python has a clean object-oriented design, provides
enhanced process control capabilities, and possesses strong integration and text
processing capabilities and its own unit testing framework, all of which contribute
to the increase in its speed and productivity. Python is considered a viable option for
building complex multi-protocol network applications.
2.3 Applications Of Python :-
❖ Web and Internet Development: Python lets you develop a web application without
too much trouble, It has libraries for internet protocols like HTML and XML, JSON,
e-mail processing, FTP and easy to use socket interface. We also have a gamut of
frameworks available. Some of these are Django, Pyramid. We also get
microframeworks like flask and bottle.
❖ Audio & Video Applications: Python can be used to develop applications that can
multi- task and also output media. Video and audio applications such as TimPlayer,
Cplay havebeendeveloped using Python libraries and they provide better stability and
performance comparedto other media players.
❖ Other applications: There are other applications for which python is used that are
Robotics, web scraping, scripting, artificial intelligence, data analysis, machine
learning, face detection, colour detection, 3D CAD applications, console-based
applications, enterprise applications, and applications for Images etc. These are some
major applications used.
2.4 Libraries :-
❖ What is Pandas?
Pandas is a Python library used for working with data sets. It has functions for
analyzing, cleaning, exploring, and manipulating data. The name "Pandas" has a
reference to both "Panel Data", and "Python Data Analysis" and was created by
Wes McKinney in 2008.
❖ Why Use Pandas?
Pandas allows us to analyze big data and make conclusions based on statistical
theories. Pandas can clean messy data sets, and make them readable and relevant.
Relevant data is very important in data science.
❖ What Can Pandas Do?
Pandas gives you answers about the data. Like:
• Is there a correlation between two or more columns?
• What is average value?
• Max value?
• Min value?
Pandas are also able to delete rows that are not relevant, or contains wrong values,
like empty or NULL values. This is called cleaning the data.
❖ What is NumPy?
NumPy is a Python library used for working with arrays. It also has functions for
working in domain of linear algebra, fourier transform, and matrices. NumPy was
created in 2005 by Travis Oliphant. It is an open source project and you can use it
freely. NumPy stands for Numerical Python.
❖ Why Use NumPy?
In Python we have lists that serve the purpose of arrays, but they are slow to process.
NumPy aims to provide an array object that is up to 50x faster than traditional
Python lists. The array object in NumPy is called ndarray, it provides a lot of
supporting functions that make working with ndarray very easy. Arrays are very
frequently used in data science, where speed and resources are very important.
❖ Why is NumPy Faster Than Lists?
NumPy arrays are stored at one continuous place in memory unlike lists, so
processes can access and manipulate them very efficiently. This behavior is called
locality of reference in computer science. This is the main reason why NumPy is
faster than lists. Also it is optimized to work with latest CPU architectures.
❖ Visualize Distributions With Seaborn
Seaborn is a library that uses Matplotlib underneath to plot graphs. It will be used
to visualize random distributions.
❖ Matplotlib Pyplot
Most of the Matplotlib utilities lies under the pyplot submodule, and are usually
imported under the plt alias:
import matplotlib.pyplot as plt
Now the Pyplot package can be referred to as plt.
CHAPTER 3
TECHNICAL DETAILS
SOFTWARE REQUIREMENTS:-
Python 3.11.2
Pip 23.0
Importing Libraries :-
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import Lasso
from sklearn.linear_model import Ridge
from sklearn.linear_model import ElasticNet
from sklearn.metrics import mean_squared_error,mean_absolute_error
from sklearn.metrics import r2_score
import pickle
HARDWARE REQUIREMENTS :-
The system will run on any operating system as Python is a binary platform Independent .
CHAPTER 4
Attribute Information
1. Date : (DD/MM/YYYY) Day, month ('june' to 'september'), year (2012) Weather
data observations
2. Temp : temperature noon (temperature max) in Celsius degrees: 22 to 42
3. RH : Relative Humidity in %: 21 to 90
4. Ws :Wind speed in km/h: 6 to 29
5. Rain: total day in mm: 0 to 16.8 FWI Components
6. Fine Fuel Moisture Code (FFMC) index from the FWI system: 28.6 to 92.5
7. Duff Moisture Code (DMC) index from the FWI system: 1.1 to 65.9
8. Drought Code (DC) index from the FWI system: 7 to 220.4
9. Initial Spread Index (ISI) index from the FWI system: 0 to 18.5
10. Buildup Index (BUI) index from the FWI system: 1.1 to 68
11. Fire Weather Index (FWI) Index: 0 to 31.1
12. Classes: two classes, namely Fire and not Fire
CHAPTER 5
Data Cleaning
Fitting Missing Values:-
Checking and Fitting Missing Values: -
Calculating Correlation: -
Feature Selection based on Correlation: -
CHAPTER 7
Data Visualization
Density plot for all features: -
Calculating percentage of Fire or Not Fire by Plotting Pie chart: -
Splitting Dataset into Training Data, Testing Data, and Validation Data: -