recipe-cleaned / README.md
Iris314's picture
Update README.md
3b1facf verified
metadata
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. 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

{
  "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
}