Closed IamShivamJaiswal closed 5 years ago
Thank you for reporting the issue @IamShivamJaiswal! You are right, as is the code won't return the expected result. Unfortunately I couldn't just merge your PR because it introduced too many changes to the notebook source code. I therefore created (and merged) a PR based on your suggested fix https://github.com/IBM/product-recommendation-with-watson-ml/pull/28/files, which only changes the relevant line of code.
In the function get_product_counts_for_customer()
while iterating we're using customer variable which is not in the scope of this function and referring to global variable defined just above this cell and due to this for all different users it returns the same result. I modified the variable which is working now for each different customer