K-means clustering - foodstuff
Nutrients in the food we consume can be classified by the role they play in building body mass. These nutrients can be divided into either macronutrients or essential micronutrients. Some examples of macronutrients are carbohydrates, protein, and fat while some examples of essential micronutrients are vitamins, minerals, and water.
Let's get started with the recipe.
Step 1 - collecting and describing data
In order to perform K-means clustering we shall be using a dataset collected on various food items and their respective
Iron content. The numeric variables are:
The non-numeric variable is:
How to do it...
Let's get into the details.
Step 2 ...
Get Practical Machine Learning Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.