Return of Recommenders with with_preference = True is all strings.
marcelcaraciolo opened this issue · comments
Marcel Caraciolo commented
When calls from Recommenders the methods to compute the recommendations or similarities the return is coming all string:
For instance:
#1. Catch the nearest neighbors based on Friends.
neighborhood = NearestNeighborsStrategy()
#2. Followers Similarity
model = MongoBooleanUserDataModel('followers')
similarity = UserSimilarity(model, jaccard_coefficient)
f_model = MongoBooleanUserDataModel('friends')
#2.Recommend Friends based on Friends Similarity.
recsys_followers = SocialBasedRecommender(f_model, similarity, neighborhood)
user_id = 'ricardocaspirro'
assert_array_equal(np.array([[u'luciananunes', u'0.5'], [u'brunomelo', u'0.5']]),
recsys_followers.recommend(user_id, 4))
You can see the return above all string (0.5 , 0.5) the correct output would be both as float values.