Probability distribution is the function that shows the probabilities of the outcome of an event or experiment. Consider a feature (i.e., column) in a dataframe. This feature is a variable and its probability distribution function shows the likelihood of the values it can take. Probability distribution function are quite useful in predictive analytics or machine…
Decorators are used to add some design pattern to a function without changing its structure. Decorators generally are defined before the function they are enhancing. To apply a decorator, we first define the decorator function it is applied to and simply add the decorator function above the function it has to be applied to. For…
Whenever we are trying to find hotels for vacation or travel, we always prefer a hotel known for its services. The simplest way to find out whether a hotel is right for you or not is to find out what people are saying about the hotel who have stayed there before. Now it’s very difficult…
Doc2vec is a technique that extracts semantic information from documents and then uses that information to classify the documents. By applying Doc2vec to existing documents, it becomes possible for AI software to rapidly identify similar topics in a large collection of text without having to read the entire corpus. This technique has been used in…
In this chapter, we’re going to cover introductory to advanced feature engineering (text to features) styles. By the end of this chapter, you’ll be comfortable with the following recipes One Hot encoding Count vectorizer N- grams Hash vectorizer Term Frequency- Inverse Document Frequency (TF- IDF) Implementing word embedding Implementing fastText Now that all the text…
1 – What is an ensemble method in NLP? Ensemble methods are a group of machine learning algorithms that work together to solve a problem. They are typically used when the machine learning algorithm is not able to solve the problem on its own or when it has not been trained enough. An ensemble method…
1 – What are some of the common NLP tasks? NLP is the process of understanding a sentence and then generating a response. It has been used in many different industries to help humans do their jobs more efficiently. Some of the common NLP tasks are: Speech recognition: This is when a computer converts spoken…
A multi-layer perceptron is a type of artificial neural network. It has one or more hidden layers between the input and output layers, each of which can be thought of as a series of processing units connected to each other in a hierarchical tree structure. The input layer nodes are connected to the hidden layer…
There are a lot of simple gradient-based NLP models that can be used to solve a variety of natural language processing tasks. Some of these include: Part-of-speech tagging: sentence parsing is a task that assigns part of speech tags to words in text and is used to analyze sentences. A task that assigns part of…
NLP is revolutionizing the way we interact with financial services. It’s allowing us to have a more natural conversation with our banks, and this is allowing us to do things that we couldn’t do before. How did you get into NLP? I got into NLP because I had a need, but it turns out that…
We are going to talk about a Natural Language Processing concept called the Bag of words model. When you’re applying an algorithm in NLP, it works with numbers and not words or sentences. We can’t feed our text directly into algorithms like that in order to analyze text data, it needs to be converted into…
Stop words are the most common words in any language that do not carry any meaning and are usually ignored by NLP. In English, examples of stop words are “a”, “and”, “the” and “of”. In NLP, stop words are typically removed from a text before it is processed for analysis. This is done to reduce…