Text Classification with TensorFlow Keras | NLP Using Embedding and LSTM Recurrent Neural Networks




[ad_1]

In this video I’m creating a baseline NLP model for Text Classification with the help of Embedding and LSTM layers from TensorFlow’s high-level API Keras.

00:00 NLP with TensorFlow
00:48 How to clean text data for machine learning
01:56 How to count the occurences of each word in a corpus
03:40 Why we need to define the sequence length for NLP Projects with Tensorflow
04:00 How to split the dataset into a train and test set
04:42 How to use Tokenizer from Keras to index words and transform text to sequences
05:49 How to pad text sequences to have a specific length for NLP Projects with Tensorflow
08:15 LSTM Model for NLP Projects with Tensorflow
08:25 Understanding Embedding and why we need to use it for NLP Projects

With Embedding, we map each word to a vector of fixed size with real-valued elements. In contrast to one hot encoding, we can use finite sized vectors to represent an infinite number of real numbers.

This feature learning technique can learn the most important features to represent the words in the data.

LSTMs are Recurrent Neural Networks (RNN) used for modeling sequences. LSTM units have a memory cell as the building block and it represents the hidden layer. In an LSTM cell there are three different types of gates: the forget gate, the input gate and the output gate.

The most important one, the forget gate allows the LSTM memory cell to reset the cell state. The forget gate decides which information is allowed to go through and which to hold back.

βœ… Subscribe and support us:
https://www.youtube.com/decisionforest?sub_confirmation=1

🌐 Let’s connect:
https://radufotolescu.com/#contact

πŸ“š Data Science resources I strongly recommend:
https://radufotolescu.com/#resources

If there are any other resources that you want us to add leave your comments below, thanks.

At DecisionForest, we work with business leaders to identify integrated AI strategies that they can leverage in their business. One of the biggest challenges facing businesses is knowing where and how to invest into AI and Machine Learning. We help them find opportunities and obtain a competitive edge through these business models of the future.
https://www.decisionforest.com

#DecisionForest

Source


[ad_2]

Comment List

  • DecisionForest
    December 27, 2020

    Hi there! If you want to stay up to date with the latest machine learning and big data analysis tutorials please subscribe here:
    https://www.youtube.com/decisionforest?sub_confirmation=1
    Also drop your ideas for future videos, let us know what topics you're interested in! πŸ‘‡πŸ»

  • DecisionForest
    December 27, 2020

    thank you man πŸ™‚

  • DecisionForest
    December 27, 2020

    Hey, love your videos!
    Do you think you could run an example with the SNLI dataset?
    I have problems conceptualizing what the input should look like since there are two sentences being compared, yielding one out three possible outputs.

  • DecisionForest
    December 27, 2020

    Hey, are you using a GPU? I'm trying to classify text using lstm on Kaggle and it is really slow even after using the Kaggle provided GPU accelerator

  • DecisionForest
    December 27, 2020

    I'm trying to build an intent classification model with tensorflow.. I'm facing some issues about validation accuracy and prediction accuracy.. I want some expert advice. can you provide your linkedin link or any contact info to help me out Please.

  • DecisionForest
    December 27, 2020

    Instead of being just 0 or 1, what I changes should I perform in order to be able to classificate (0, 1, 2, 3) for example?

  • DecisionForest
    December 27, 2020

    Great stuff! also made your likes count 69 by adding another one.

  • DecisionForest
    December 27, 2020

    how to see classification label against every sentence, could you put more light

  • DecisionForest
    December 27, 2020

    Great explanaition! Thank you. Subscribed.

  • DecisionForest
    December 27, 2020

    Hey could someone please answer why would you fit the tokenizer on only the training data and not on the test data? Wont there be some words in the test data that are not present in the training data? How does it affect accuracy?

  • DecisionForest
    December 27, 2020

    Thanks!

  • DecisionForest
    December 27, 2020

    Hi,
    thank you for this video
    i have question in terms of prediction.
    on what should i do the prediction? on test_padded ?

    like this
    predictions = model.predict(test_padded, steps=1, verbose=0)
    thanks

Write a comment