Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Machine Learning By Example

You're reading from  R Machine Learning By Example

Product type Book
Published in Mar 2016
Publisher
ISBN-13 9781784390846
Pages 340 pages
Edition 1st Edition
Languages
Author (1):
Raghav Bali Raghav Bali

Table of Contents (15) Chapters

R Machine Learning By Example
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Preface
Getting Started with R and Machine Learning Let's Help Machines Learn Predicting Customer Shopping Trends with Market Basket Analysis Building a Product Recommendation System Credit Risk Detection and Prediction – Descriptive Analytics Credit Risk Detection and Prediction – Predictive Analytics Social Media Analysis – Analyzing Twitter Data Sentiment Analysis of Twitter Data Index

Frequent itemset generation


We will now look at a better technique to find patterns and detect frequently bought products. For this, we will be using the frequent itemset generation technique. We will be implementing this algorithm from scratch because, even though when we solve any machine learning or optimization problem we usually use readymade machine learning algorithms out of the box which are optimized and available in various R packages, one of the main objectives of this book is to make sure we understand what exactly goes on behind the scenes of a machine learning algorithm. Thus, we will see how we can build some of these algorithms ourselves using the principles of mathematics, statistics, and logic.

Getting started

The data we will be using for this is the shopping_transaction_log.csv dataset which we used to explain the concepts of market basket analysis at the beginning of the chapter. The code we will be using for this section is available in the ch3_frequent itemset generation...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}