Chapter 1: Fundamentals of Machine Learning and Deep Learning

Our world is rich with natural language data. Over the past several decades, the way we communicate with one another has shifted to the digital realm and, as such, this data can be used to build models that can improve our online experience. From returning relevant results within a search engine, to autocompleting the next word you type in an email, the benefits of being able to extract insights from natural language is clear to see.

While the way we, as humans, understand language differs notably from the way a model or artificial intelligence may understand it, by shedding light on machine learning and what it is used for, we can begin to understand just how these deep learning models understand language and what fundamentally happens when a model learns from data.

Throughout this book, we will explore this application of artificial intelligence and deep learning to natural language. Through the use of PyTorch, we will learn, step by step, how to build models that allow us to perform sentiment analysis, text classification, and sequence translation, which will lead to us building a basic chatbot. By covering the theory behind each of these models, as well as demonstrating how to implement them practically, we will demystify the field of natural language processing (NLP) and provide you with enough background for you to start building your own models.

In our first chapter, we will explore some of the basic concepts of machine learning. We will then take this a step further by examining the fundamentals of deep learning, neural networks, and some of the advantages that deep learning methods afford over basic machine learning techniques. Finally, we will take a more detailed look at deep learning, specifically with regard to NLP-specific tasks and how we can use deep learning models to gain insights from natural language. Specifically, we'll cover the following topics:

  • Overview of machine learning
  • Introduction to neural networks
  • NLP for machine learning