Giter Club home page Giter Club logo

kaggle-question-pairs-quora's Introduction

Kaggle-question-pairs-quora

My solution for the Quora Question Pair contest hosted on Kaggle[1]

Model Implementation

Final submission is the ensemble of 7 LSTM based models and 6 xgboost models with different hyperparameters. LSTM model architecture is based on lystdo[2] model on kaggle kernel. Keras architecture of the model is shown below:

[model_1.png]

Nadam optimizer and binary cross-entropy is used as the loss function, early stopping round by monitoring validation loss is used to avoid overfitting. To create different permutations of hyper-parameter in both xgboost model and lstm, values of hyper-parameter is chosen at random from a defined set.

Experiments

Dataset is split into two parts in 90:10 ratio. Each LSTM model was trained for approx 19 eochs and optimal weights were saved using model checkpoint by monitoring validation loss, each epoch took around 220s on Nvidia GTX 1070 gpu and each xgboost model is trained using early stoping round of 50. The configration gives a logloss of 0.14672 on private leaderboard.

Model LogLoss
Avg(7 LSTM + 6 XGB) 0.14672
LSTM Model 0.15918
XGB Model 0.15392

Requirements

  • Python 2.7.13
  • jupyter 4.3.1

Usage

This repository contains 5 notebooks performing different function, it can be used by simply running the notebook server by using standard Jupyter command:

$ jupyter notebook

feature_engineering.ipynb : Basic feature Generation
page_rank.ipynb : Page rank feature generation
glove_840b+leaky_features.ipynb : LSTM model training
xgboost.ipynb : XG Boost model training
averagging.ipynb : Ensemblling the models

License

This project is licensed under the MIT License - see the LICENSE.md file for details

kaggle-question-pairs-quora's People

Contributors

dysdsyd avatar

Watchers

 avatar  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.