Jul-24-2019, 05:58 PM
Inside the function
its expecting the passed in
it looks like you want to be calling the instance instead of the class
The method
def getRecommendations(prefs, person, similarity = sim_pearson):
its expecting the passed in
prefs
to be an object that can be iteratedfor other in prefs:you are calling this method with
b=getRecommendations(STproject.dictionary,STproject.selected,similarity=sim_distance)
it looks like you want to be calling the instance instead of the class
b=getRecommendations(self.dictionary,self.selected,similarity=sim_distance)
The method
dictionary
does not return a iterable of prefs and the method selected
does not return a person.