Articles About Machine Learning

A Gentle Introduction to the Bag-of-Words Model

Last Updated on August 7, 2019 The bag-of-words model is a way of representing text data when modeling text with machine learning algorithms. The bag-of-words model is simple to understand and implement and has seen great success in problems such as language modeling and document classification. In this tutorial, you will discover the bag-of-words model for feature extraction in natural language processing. After completing this tutorial, you will know: What the bag-of-words model is and why it is needed to […]

Read more

What Are Word Embeddings for Text?

Last Updated on August 7, 2019 Word embeddings are a type of word representation that allows words with similar meaning to have a similar representation. They are a distributed representation for text that is perhaps one of the key breakthroughs for the impressive performance of deep learning methods on challenging natural language processing problems. In this post, you will discover the word embedding approach for representing text data. After completing this post, you will know: What the word embedding approach […]

Read more

How Does Attention Work in Encoder-Decoder Recurrent Neural Networks

Last Updated on August 7, 2019 Attention is a mechanism that was developed to improve the performance of the Encoder-Decoder RNN on machine translation. In this tutorial, you will discover the attention mechanism for the Encoder-Decoder model. After completing this tutorial, you will know: About the Encoder-Decoder model and attention mechanism for machine translation. How to implement the attention mechanism step-by-step. Applications and extensions to the attention mechanism. Kick-start your project with my new book Deep Learning for Natural Language […]

Read more

How to Prepare Movie Review Data for Sentiment Analysis (Text Classification)

Last Updated on August 14, 2020 Text data preparation is different for each problem. Preparation starts with simple steps, like loading data, but quickly gets difficult with cleaning tasks that are very specific to the data you are working with. You need help as to where to begin and what order to work through the steps from raw data to data ready for modeling. In this tutorial, you will discover how to prepare movie review text data for sentiment analysis, […]

Read more

How to Develop an Encoder-Decoder Model with Attention in Keras

import tensorflow as tf from keras import backend as K from keras import regularizers, constraints, initializers, activations from keras.layers.recurrent import Recurrent, _time_distributed_dense from keras.engine import InputSpec   tfPrint = lambda d, T: tf.Print(input_=T, data=[T, tf.shape(T)], message=d)   class AttentionDecoder(Recurrent):       def __init__(self, units, output_dim,                  activation=‘tanh’,                  return_probabilities=False,                  name=‘AttentionDecoder’,                  kernel_initializer=‘glorot_uniform’,                  recurrent_initializer=‘orthogonal’,                  bias_initializer=‘zeros’,                  kernel_regularizer=None,                  bias_regularizer=None,                  activity_regularizer=None,                  kernel_constraint=None, To finish reading, please visit source site

Read more

How to Clean Text for Machine Learning with Python

Last Updated on August 7, 2019 You cannot go straight from raw text to fitting a machine learning or deep learning model. You must clean your text first, which means splitting it into words and handling punctuation and case. In fact, there is a whole suite of text preparation methods that you may need to use, and the choice of methods really depends on your natural language processing task. In this tutorial, you will discover how you can clean and […]

Read more

Implementation Patterns for the Encoder-Decoder RNN Architecture with Attention

Last Updated on August 14, 2019 The encoder-decoder architecture for recurrent neural networks is proving to be powerful on a host of sequence-to-sequence prediction problems in the field of natural language processing. Attention is a mechanism that addresses a limitation of the encoder-decoder architecture on long sequences, and that in general speeds up the learning and lifts the skill of the model on sequence-to-sequence prediction problems. In this post, you will discover patterns for implementing the encoder-decoder model with and […]

Read more

How to Develop a Deep Learning Bag-of-Words Model for Sentiment Analysis (Text Classification)

Last Updated on September 3, 2020 Movie reviews can be classified as either favorable or not. The evaluation of movie review text is a classification problem often called sentiment analysis. A popular technique for developing sentiment analysis models is to use a bag-of-words model that transforms documents into vectors where each word in the document is assigned a score. In this tutorial, you will discover how you can develop a deep learning predictive model using the bag-of-words representation for movie […]

Read more

Best Practices for Text Classification with Deep Learning

Last Updated on August 24, 2020 Text classification describes a general class of problems such as predicting the sentiment of tweets and movie reviews, as well as classifying email as spam or not. Deep learning methods are proving very good at text classification, achieving state-of-the-art results on a suite of standard academic benchmark problems. In this post, you will discover some best practices to consider when developing deep learning models for text classification. After reading this post, you will know: […]

Read more

Difference Between Return Sequences and Return States for LSTMs in Keras

Last Updated on August 14, 2019 The Keras deep learning library provides an implementation of the Long Short-Term Memory, or LSTM, recurrent neural network. As part of this implementation, the Keras API provides access to both return sequences and return state. The use and difference between these data can be confusing when designing sophisticated recurrent neural network models, such as the encoder-decoder model. In this tutorial, you will discover the difference and result of return sequences and return states for […]

Read more
1 167 168 169 170 171 226