jgte29 / team-casimir-funk-proj02

0 stars 0 forks source link

Code Review ( Thomas Allison ) #3

Open stevennaa opened 4 months ago

stevennaa commented 4 months ago

Hello, I enjoyed going through your collective work on this project! I enjoyed that the README.md file was thorough and organized regarding setting up the code to run and review. I particularly liked and appreciated that the all necessary PIP installs were commented out in a cell and labeled appropriately to help minimize confusion and missing libraries. Like so,

Screenshot 2024-03-05 at 5 44 17 PM

I did have a re-occuring issue that was quite persistent and annoying. The number of included .ipynb files contained the read_csv functions, although the pathways were not correct for my running environment (DataHub). It was often the case where the pathway nested in the read_csv function contained ".Data" , in the beginning.

Screenshot 2024-03-05 at 5 40 52 PM

This led to persistent errors when running the 'master_notebook.ipynb', so I first had to fix all the paths to their appropriate .csv name in each notebook. Although I finally fixed the issue and from then the code ran relatively smoothly.

The interactive_run_alg() function seemed particularly interesting as well.

Screenshot 2024-03-05 at 5 45 09 PM

It seemed to be extremely useful for people who want to follow recommended diets, to see a general baseline of what meets the essential nutritional requirements. Although, when I attempted to find a diet for a 20 Y/O Male from 2 locations 'Whole Foods' & 'Safeway', I was unable to find a Diet. I hope that this issue can be resolved, as for other listed stores diets and nutrition are located . Perhaps there are missing data for ingredients at either Safeway or Whole Foods.

The last issue I had with the master_notebook.ipynb was that the "interactive_price_sensitivity()" would result in the following error. Despite all my efforts and slight tweaking of code structure, I was unable to resolve this issue. The following error looks like,

Screenshot 2024-03-05 at 5 45 51 PM

At the bottom of this error is states that [-29] was not in the index. I still do not know how to fix this.

yingyinlii commented 4 months ago

Hi,

Thank you for running our code and your detailed feedback! We are glad that you enjoyed going through our project!

For your first concern, we will ensure the correct CSV file paths are used in the notebook.

Regarding the interactive_run_alg() function and the absence of optimal diets exclusively from Safeway or Whole Foods, we would like to clarify that this outcome is not due to a coding error. Our algorithm aims to meet specific nutrient minimums while keeping other levels, like energy and sodium, below certain thresholds. The food items from Safeway and Whole Foods were not able to balance these dietary requirements within the set limits. (Our food item list only includes 50+ products so it does come with limitations). If you try to combine Safeway/Whole Foods products with products from another different store, the algorithm is able to return results :)

As for the '[-29] not in the index' error, our team has reviewed it and did not encounter this issue on our end. It may be due to invalid inputs or incorrect file path. We recommend verifying these possible elements to see if it gets sorted out.

Once again, thanks for your feedback. We greatly appreciate it and hope our suggestions help!