Book Image

Applied Unsupervised Learning with Python

By : Benjamin Johnston, Aaron Jones, Christopher Kruger
Book Image

Applied Unsupervised Learning with Python

By: Benjamin Johnston, Aaron Jones, Christopher Kruger

Overview of this book

Unsupervised learning is a useful and practical solution in situations where labeled data is not available. Applied Unsupervised Learning with Python guides you in learning the best practices for using unsupervised learning techniques in tandem with Python libraries and extracting meaningful information from unstructured data. The book begins by explaining how basic clustering works to find similar data points in a set. Once you are well-versed with the k-means algorithm and how it operates, you’ll learn what dimensionality reduction is and where to apply it. As you progress, you’ll learn various neural network techniques and how they can improve your model. While studying the applications of unsupervised learning, you will also understand how to mine topics that are trending on Twitter and Facebook and build a news recommendation engine for users. Finally, you will be able to put your knowledge to work through interesting activities such as performing a Market Basket Analysis and identifying relationships between different products. By the end of this book, you will have the skills you need to confidently build your own models using Python.
Table of Contents (12 chapters)
Applied Unsupervised Learning with Python
Preface

Characteristics of Transaction Data


The data used in market basket analysis is transaction data or any type of data that resembles transaction data. In its most basic form, transaction data has some sort of transaction identifier, such as an invoice or transaction number, and a list of products associated with said identifier. It just so happens that these two base elements are all that is needed to perform market basket analysis. However, transaction data rarely – it is probably even safe to say never – comes in this basic form. Transaction data typically includes pricing information, dates and times, and customer identifiers, among many other things:

Figure 8.10: Each available product is going to map back to multiple invoice numbers

Due to the complexity of transaction data, data cleaning is crucial. The goal of data cleaning in the context of market basket analysis is to filter out all the unnecessary information, which includes removing variables in the data that are not relevant, and...