File size: 5,389 Bytes
dcf27c0 c193d49 dcf27c0 c193d49 dcf27c0 3b1facf c193d49 dcf27c0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | ---
dataset_info:
pretty_name: Recipe Cleaned Dataset
task_categories:
- recommendation
- text-classification
languages:
- en
size_categories:
- 100K<n<1M
license: mit
annotations_creators:
- machine
source_datasets:
- original
multilinguality: monolingual
---
# Recipe Cleaned Dataset
## Dataset Summary
This dataset is a structured and cleaned collection of recipe data derived from the [Food.com Recipes and Interactions dataset](https://www.kaggle.com/datasets/shuyangli94/food-com-recipes-and-user-interactions/data?select=RAW_recipes.csv). It is designed for ingredient-based personalization, machine learning training, and interactive recommendation systems. The dataset integrates a hierarchical ingredient taxonomy, standardized nutrition information, and categorical metadata (e.g., diet tags, cuisine attributes, region) to support downstream filtering and modeling.
---
## Source and Collection Process
The original data comes from Food.com via Kaggle. It consists of recipes and user interactions collected over several years, published under a permissive license for research and educational use. Only the `RAW_recipes.csv` portion was used in this dataset. No private or login-restricted data was collected.
---
## Labeling and Cleaning Process
All labeling was performed using a **rule-based and embedding-based taxonomy mapping pipeline**. Ingredients were clustered into parent classes using sentence embeddings (~1,000+ parent nodes), and child phrases were mapped using keyword expansion and string matching. A small subset was manually inspected to ensure mapping accuracy.
Additional processing includes:
- Deduplication and invalid entry filtering
- Text normalization
- Region and diet tag standardization
- Nutrition field standardization
---
## Ethical Notes
All data are derived from a publicly released Kaggle dataset.
No personal user information is included.
Nutrition values are estimated and must **not** be used for health or medical decisions.
---
## Augmented/Synthetic Data
No augmented or synthetic samples are included in this dataset.
---
## Dataset Structure
- **Format**: CSV (UTF-8)
- **Number of Recipes**: ~180,000
- **Schema**:
- **Basic Info**: `name`, `minutes`, `tags`, `n_steps`, `steps`
- **Ingredients (raw & standardized)**:
- Raw ingredient lists split into categories: `staple`, `main`, `seasoning`, `other`
- Each category has a mapped parent version: e.g. `staple_parent`, `main_parent`, etc.
- `n_ingredients` gives the count of ingredients per recipe.
- **Nutrition**: `calories`, `total_fat_pdv`, `sugar_pdv`, `sodium_pdv`, `protein_pdv`, `saturated_fat_pdv`, `carbohydrates_pdv`
(all standardized per serving; PDV = % Daily Value)
- **Metadata**: `region` (51 classes), `diet_tags`, `cuisine_attr` (671 classes), `is_vegan_safe`, `is_vegetarian_safe`
---
## Ingredient Taxonomy
To standardize heterogeneous ingredient strings, a parent–child taxonomy was constructed:
- Approximately 1,000+ parent ingredient classes generated through sentence embedding clustering.
- Original phrases (child nodes) are mapped via rule-based string matching and keyword expansion.
- Four functional categories are defined:
- **Staple**: e.g., rice, pasta, flour
- **Main**: protein sources or key components
- **Seasoning**: spices, condiments, sauces
- **Other**: toppings, garnishes, optional extras
This structure enables consistent representation across recipes, improves filtering granularity, and simplifies feature engineering for ML models.
---
## Data Cleaning Pipeline
1. Deduplication & Filtering — remove exact/near-duplicates and invalid rows.
2. Text Normalization — lowercase conversion, punctuation cleanup, Unicode fixes.
3. Ingredient Categorization & Mapping — split into functional categories, map to parent classes.
4. Tag & Region Standardization — unify tags and infer cuisine/region attributes.
5. Nutrition Standardization — align units, compute PDV values, fill missing fields when possible.
---
## Risks and Bias
The dataset inherits several biases from the original Food.com source:
- **Regional bias**: Western and American cuisines dominate, leading to under-representation of other cuisines.
- **Popularity bias**: Highly rated and frequently interacted recipes are over-represented, which may skew recommendation models.
- **Nutritional estimation bias**: Nutrition values are approximate and may vary from real-world measurements.
These biases may affect fairness and diversity in downstream models.
---
## Intended Uses and Limitations
**Intended Uses**
- Ingredient-based recipe recommendation research
- Cold-start personalization and ranking model development
- Educational and academic applications
**Not Intended For**
- Medical or nutritional decision-making
- High-stakes personalization without bias mitigation
- Commercial deployment without further validation
---
## Exploratory Data Analysis (EDA)
### Sample Entry
```json
{
"name": "Spaghetti Aglio e Olio",
"minutes": 15,
"ingredients": ["spaghetti", "garlic", "olive oil", "red pepper flakes", "parsley", "salt"],
"main_parent": ["pasta"],
"seasoning_parent": ["garlic", "olive oil", "red pepper", "salt"],
"calories": 420,
"region": "Italian",
"diet_tags": ["vegetarian"],
"n_steps": 3
}
|