CGAS BIO544 Assignment - 02

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Computational Gastronomy

Coding Assignment 2
You may use Python and Jupitor Notebook as an IDE for completing the assignments and documentation.
Note: You are responsible for the backup of data as well as results, which will be used for evaluation.

1. Implement the following copy-mutate algorithm for the data of recipes from Kaggle: [20]
1. Start with Epoch =0 and Number of Recipes Per Epochs = Round (Number of
recipes/Number of Epochs)
2. Initiate the primordial cuisine (𝑡 = 0), Nature Basket and the Kitchen Basket:
- Size of recipes = (say) 10
- Number of recipes at 𝑡 = 0, 𝑁𝑅𝑡=0 = 500
- Size of Kitchen Basket = 50
- 𝑁𝑅𝑡=0 ≫ Size of KB
3. Pick a random recipe from the primordial kitchen for the ‘modification’.
4. Pick an ingredient randomly from the chosen recipe & one from KB compare the
ingredients.
5. If the KB ingredient is not the same as recipe ingredient replace the latter with the
former.
6. Repeat Steps 4—5 until the Recipe gets modified.
7. Add the new ‘modified/mutated’ recipe to the Kitchen Basket if the same isn’t there
already.
8. Repeat 3—7 until the number of recipes reaches the desired number of the next Epoch.
9. Analyze the cuisine for the recipe size as well as the frequency-rank statistics the end of
each Epoch.

2. Improvise the above algorithm to incorporate ingredient deletion as well as addition as


opposed to only replacement. Analyze the cuisine for the recipe size as well as the frequency-
rank statistics the end of each Epoch. What is the complexity of these algorithms? [20]

Computational Gastronomy. Monsoon2021

You might also like