Skip to content

Commit 1cd164b

Browse files
author
Vignesh Kumar
authored
Made a change to mean calculation
Y[1,R[1,:]] was indexing over the columns given by R[1,:] which returns binary values and thereby iterating over indexes 0 and 1 of Y[1].
1 parent 50a83a2 commit 1cd164b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

notebooks/ml/ML-Exercise8.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@
10451045
}
10461046
],
10471047
"source": [
1048-
"Y[1,R[1,:]].mean()"
1048+
"Y[1,np.where(R[1,:]==1)[0]].mean()"
10491049
]
10501050
},
10511051
{

0 commit comments

Comments
 (0)