GithubHelp home page GithubHelp logo

rishabh-khurana / earthquake-prediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 30.35 MB

To predict the time that an earthquake will occur in a laboratory test using Scikit-Learn (Pedregosa et al. (2011), XGBoost (Chen & Guestrin, 2016) and LightGBM (Ke, et al., 2017) libraries for machine learning and support. The laboratory test applies shear forces to a sample of earth and rock containing a fault line. If the physics are ultimately shown to scale from the laboratory to the field, researchers will have the potential to improve earthquake hazard assessments that could save lives and billions of dollars in infrastructure. The metric used is Mean Absolute Error (MAE) and thus a lower value is better with zero representing a perfect fit.

Python 100.00%

earthquake-prediction's Introduction

Earthquake-Prediction

To predict the time that an earthquake will occur in a laboratory test using Scikit-Learn (Pedregosa et al. (2011), XGBoost,CatBoost and LightGBM libraries for machine learning and support. The laboratory test applies shear forces to a sample of earth and rock containing a fault line. If the physics are ultimately shown to scale from the laboratory to the field, researchers will have the potential to improve earthquake hazard assessments that could save lives and billions of dollars in infrastructure. The metric used is Mean Absolute Error (MAE) and thus a lower value is better with zero representing a perfect fit.

To setup the project

In the project directory, create folder data_files/ and store the files train.csv, sample_submission.csv, and test/ folder containing segment_ids. These files can be downloaded from the link https://www.kaggle.com/c/LANL-Earthquake-Prediction/data. Also create result/ folder in this directory.

To install the dependencies:

Before running the actual code , we need to install all libraries used in the module using the following command:

pip3 install -r requirements.txt

To run the code

Type the following command to run the code:

python3 main.py

Which will run the code in the 'main.py' file , applies the machine learning model depending on the function called under the

__name__=__main__:

section of the main.py file.

Training Model Files

Our Implemention basically compares the accuracy of prediction of time to failure using different machine learning models , namely xgBoost, lightgbm and catBooster , which is implemented in the following files:

prediction_cbr.py -> CatBoost prediction_xgb.py -> xgBoost prediction_lgb.py -> lightgbm

Result Files

For each model, after the code runs to completion, four files are generated in the folder: data_files/result/ namely, train_features.csv which stores training data features, test_features.csv which stores test data features, time_to_failure.csv which stores actual time_to_failure values, and sample_submission.csv which stores predicted time_to_failure values.

earthquake-prediction's People

Contributors

aarushigera55 avatar amriteshs avatar rishabh-khurana avatar sahil-punchhi avatar

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.