Giter Site home page Giter Site logo

mgrantham18 / fire-learn Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.21 MB

Using machine learning to determine the causes of wildfires

License: Apache License 2.0

Python 100.00%
fire machine-learning python scikit-learn kaggle knearest-neighbors-classifier

fire-learn's Introduction

Fire Learn

The goal of this project was to use machine learning to determine the causes of wildfires.

The data used to train the model was obtained from Kaggle
This data set contains 1.88 Million Wildfire information from the last 24 years.

Data was processed through and all rows which did not have a cause or had the cause listed as "Miscellaneous" were removed. The first trail was run using the day of the year the fire started, the day that it was controlled, the size in acres of the fire, and the latitude and longitude of the fire. Next the same parameters were run also using the year the fire happened as a parameter. The year led to an increase in accuracy, but since all of the fires happened in the past years in the future would likely not work well with the model. The next model also used the owner of the property. And the next model after that also used the owner and the reporting agency. The final model tested with all of the previously mentioned parameters.

The top 60 KNN models were chosen to be used in another model which ran the data through each one and made a prediciton based on the mode of the model's prediction. These same 60 neighbors were used with all of the other models tested.

A list of what all of the files are is below

  • fire.csv is the raw data converted from the SQLite
  • Futura.ttf is the font for the graphs
  • knn_graphs.py makes the graphs of K versus Accuracy
  • multi_graphs.py makes the graphs showing number of Models which came up with the same prediction versus the Accuracy
  • multi_knn.png result of the previously mentioned script
  • multi_knn1.py tests the top 60 most accurate models which use the start day, end day, size, latitude, and longitude of a fire
  • multi_knn2.py tests the top 60 most accurate models which use the start day, end day, size, latitude, longitude, and owner of the property of a fire
  • multi_knn3.py tests the top 60 most accurate models which use the start day, end day, size, latitude, longitude, owner, and reporting agency of a fire
  • multi_knn4.py tests the top 60 most accurate models which use the start day, end day, size, latitude, longitude, owner, reporting agency, and year of a fire
  • process1.py turns fire.csv into processed.csv
  • process2.py turns fire.csv into processed2.csv
  • process3.py turns fire.csv into processed3.csv
  • processed.csv CAUSE [STR], START DOY [INT], END DOY [INT], SIZE [FLOAT], LAT [FLOAT], LONG [FLOAT], REPORTER [STR], YEAR [INT], OWNER [STR]
  • processed2.csv CAUSE [STR], START DOY [INT], END DOY [INT], SIZE [FLOAT], LAT [FLOAT], LONG [FLOAT], YEAR [INT], OWNER [INT]
  • processed3.csv CAUSE [STR], START DOY [INT], END DOY [INT], SIZE [FLOAT], LAT [FLOAT], LONG [FLOAT], REPORTER [INT], YEAR [INT], OWNER [INT]
  • results.csv results from test_knn1.py
  • results2.csv results from multi_knn1.py
  • results3.csv results from test_knn1-5.py
  • results4.csv results from multi_knn2.py
  • results5.csv results from test_knn2.py
  • results6.csv results from multi_knn3.py
  • results7.csv results from test_knn3.py
  • results8.csv results from multi_knn4.py
  • results9.csv results from test_knn4.py
  • test_knn1.py runs KNN algorithm with the start day, end day, size, latitude, and longitude of a fire
  • test_knn1-5.py runs KNN algorithm with the start day, end day, size, latitude, longitude, and year of a fire
  • test_knn2.py runs KNN algorithm with the start day, end day, size, latitude, longitude, and owner of the property of a fire
  • test_knn3.py runs KNN algorithm with the start day, end day, size, latitude, longitude, owner, and reporting agency of a fire
  • test_knn4.py runs KNN algorithm with the start day, end day, size, latitude, longitude, owner, reporting agency, and year of a fire

fire-learn's People

Contributors

mgrantham18 avatar

Watchers

 avatar  avatar

fire-learn's Issues

huge_knn

It doesn't work... Ill fix it eventually

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.