Question: IndexError Traceback ( most recent call last ) in ( ) 1 1 1 2 # Evaluate cost function - - - > 1 3
IndexError Traceback most recent call last
in # Evaluate cost function J coficostfuncXr Wr br Yr Rr; printfCost: J:f
in coficostfuncX W b Y R lambda for i in rangenummovies: for j in rangenumusers: if Ri j: JnpdotXj : Thetai : Yi j
IndexError: index is out of bounds for axis with size
here is my code
numusersr
nummoviesr
numfeaturesr
Xr X:nummoviesr :numfeaturesr
Wr W:numusersr:numfeaturesr
br b :numusersrreshape
Yr Y:nummoviesr :numusersr
Rr R:nummoviesr :numusersr
# Evaluate cost function
J coficostfuncXr Wr br Yr Rr;
printfCost: J:f
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
