Giter VIP home page Giter VIP logo

danieldacosta / rnn-keras Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 3.0 2.14 MB

Building a Multi-Label Classifier doesn't seem a difficult task using Keras, but when you are dealing with a highly imbalanced dataset with more than 30 different labels and with multiple losses it can become quite tricky.

License: MIT License

Jupyter Notebook 98.09% Python 1.91%
multi-label-classifier multiple-losses-rnn rnn keras multi-class-classification

rnn-keras's Introduction

Multiple-Outputs and Multiple-Losses RNN in Keras

The project consists of a Multi-Label Text Classifier project using a RNN from Keras.

The dataset consists of disaster messages that are classified into 36 different classes. The goal of the project is to classify an input message into these different classes.

The goal of the project is to explain how to deal with Multiple-Outputs and Multiple-Losses RNN in Keras. The project comes across this issue keras-team/keras#8011 and presents a validy solution.

There are two approches on the project:

  • Creating the Embeddings using Keras Embedding Layer
  • Using Glove pre-trained embedding

Check the [Text Classifier with Multiple Outputs and Multiple Losses in Keras] Medium Post (https://medium.com/@danieldacosta_75030/text-classifier-with-multiple-outputs-and-multiple-losses-in-keras-4b7a527eb858) for further details!

Dataset

The dataset consists of disaster messages that are classified into 36 different classes. The dataset in highly imbalanced, having different distributions for each class. In order to reduce this problem a class weighted approach was used, where we make the classifier aware of the imbalanced data by incorporating the weights of classes into the cost function.

In the RNN model, a class_weight paramater was set in order to reduce the imbalaced distributions problem.

Acknowledgments and References

rnn-keras's People

Stargazers

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