mstampfer / Coursera-Stanford-ML-Python

Coursera/Stanford Machine Learning course assignments in python
445 stars 231 forks source link

./ex7/submit.py: Error in part 1 #12

Open marc-chan opened 7 years ago

marc-chan commented 7 years ago

Submission for part 1 (find closest centroids) fail when submitting to grader.

if part_id == 1:
        idx = func(X, C)
        return sprintf('%0.5f ', idx[1]+1)

Instead of returning idx[1]+1, should return idx+1 to pass the grader.