#๐Ÿ”’ Recommender System Help

11 messages ยท Page 1 of 1 (latest)

wraith canyonBOT
#

@jagged relic

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

jagged relic
#

....well that's unfortunate. I'm looking for help with a recommender system as an ungraded lab in the IBM Machine Learning Professional certificate course. I believe the issue is in this code, as I know that that generate_recommendations_for_one_user(enrolled_course_ids, unselected_course_ids, id_idx_dict, sim_matrix) works for an individual user.

https://paste.pythondiscord.com/4TPA

#

I believe my original message was removed because I attached a Jupyter notebook

elder delta
#

Can you describe what it's doing, and how that differs from what you expected?

#

that code that you posted isn't complete enough for me to run, fwiw

jagged relic
#

Yeah it's a whole notebook. So the error I'm getting is that all Arrays must be of the same length, and that's when I try to run:

res_dict = {}
users, courses, sim_scores = generate_recommendations_for_all()
res_dict['USER'] = users
res_dict['COURSE_ID'] = courses
res_dict['SCORE'] = sim_scores
res_df = pd.DataFrame(res_dict, columns=['USER', 'COURSE_ID', 'SCORE'])
res_df

I know that presently I am not assigning anything to the COURSE_ID array, so that error makes sense, but I don't know how to get the COURSE_IDs out of each iteration of generate_recommendations_for_one_user()

#

I'm gonna get together the code from my file into a paste hang on

#

That should be all of it

wraith canyonBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.