From the course: Deep Learning with Python and Keras: Build a Model for Sentiment Analysis
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Representing text using count vectorization
From the course: Deep Learning with Python and Keras: Build a Model for Sentiment Analysis
Representing text using count vectorization
- [Instructor] In this movie, we'll see how we can perform text vectorization in inter flow. This is the process of converting our text data into numerical vectors or arrays of numbers, which will allow machine learning models to work with and analyze text. Text vectorization is performed using a keras layer. We'll first vectorize text using the count vectorizer. Before we apply the count vectorizer, on our financial sentiment data, let's understand how it works on a small sample data set. Now I've chosen the vocabulary size to be small, just 30, so the length of the vector generated for each document or each bit of text will be of size 30. I instantiate the count vectorizer using the text vectorization class. Text vectorization is a tensor flow pre-processing layer, which maps text features to integer sequences. The text vectorization layer performs the following steps. It'll first standardize each example using the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Feed forward neural networks4m 31s
-
(Locked)
Splitting data into training test and validation sets5m 3s
-
(Locked)
Representing text using count vectorization8m 32s
-
(Locked)
Configuring the dense neural network6m 11s
-
(Locked)
Training and evaluating the DNN3m 12s
-
(Locked)
Configuring the count vectorizer as a model layer2m 52s
-
(Locked)
Representing text using TF-IDF vectorization5m 9s
-
(Locked)
Training and evaluating the model3m 19s
-
(Locked)
Representing text using integer sequences3m 58s
-
(Locked)
Training a DNN using embeddings7m 21s
-
(Locked)
-
-