I was studying the Machine Learning specialization, unsupervised learning, week 2, content-based recommender system.
I encountered this error.
I couldn’t understand it at all. help, please!!!
this is the model that i was trying to use
% mentor edit: code removed
and i got this error
1 Like
TMosh
May 11, 2024, 4:31am
2
Please don’t post your code for graded assignments on the forum. That’s not allowed by the Code of Conduct.
If a mentor needs to see your code, we’ll contact you with instructions.
Comments:
You don’t need to import tensor flow in this cell. That’s done when you run the first cell in the notebook.
Do not add extra code outside of the areas marked for your code.
You’ve added trailing commas here. Why?
2 Likes
im sorry.
yeah i already imported tf
The reason i was using the comma is because of this error
e
1 Like
TMosh
May 11, 2024, 5:32am
4
Did you modify the code that sets num_user_features?
user_train.shape[1] - 3
removed the userid, rating count and ave rating during training
1 Like
TMosh
May 11, 2024, 7:06am
6
I don’t understand what that refers to.
i used -3 is to remove the columns → the userid, rating count and ave rating during training
user_train.shape is (40707, 17)
user_train.shape[1]-3 → 14
this is the error here
1 Like
TMosh
May 11, 2024, 3:28pm
8
The code cell that loads the data was provided for you. You did not need to modify it.
1 Like
TMosh
May 12, 2024, 4:19am
10
I thought your previous post said you had removed some variables for training.
i didnt modify it sir.
what do you think the error is ?
1 Like
TMosh
May 12, 2024, 3:54pm
13
Updates:
The student is using an obsolete version of the notebook, and it appears it’s being run locally (outside the Coursera Labs environment).
There seem to be some version incompatibilities with the tools that the notebook was designed to use.
When you run code outside of the course, you immediately will encounter challenges in getting compatible versions of all of the packages installed.
1 Like
{mentor edit: reply removed}
1 Like
TMosh
May 16, 2024, 2:28pm
15
@G_Desai , I’m removing your reply, because it isn’t consistent with the assignment, and posting your code isn’t allowed on the forum.