O'Reilly logo

Practical Machine Learning Cookbook by Atul Tripathi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Principal component analysis - understanding world cuisine

Food is a powerful symbol of who we are. There are many types of food identification, such as ethnic, religious, and class identifications. Ethnic food preferences become identity markers in the presence of gustatory foreigners, such as when one goes abroad, or when those foreigners visit the home shores.

Getting ready

In order to perform principal component analysis, we shall be using a dataset collected on the Epicurious recipe dataset.

Step 1 - collecting and describing data

The dataset titled epic_recipes.txt shall be used. The dataset is in standard format.

How to do it...

Let's get into the details.

Step 2 - exploring data

The first step is to load the following packages:

    > install.packages("glmnet") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required