Content based recommender system normalization error

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

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?
image

2 Likes

im sorry.
yeah i already imported tf
The reason i was using the comma is because of this error


e

1 Like

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

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

The code cell that loads the data was provided for you. You did not need to modify it.

image

1 Like

i didn’t modify anything
image

1 Like

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

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

@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.