dibgerge / ml-coursera-python-assignments

Python assignments for the machine learning class by andrew ng on coursera with complete submission for grading capability and re-written instructions.
5.43k stars 2.15k forks source link

Exercise 6 in function dataset3Params #47

Open amritansh22 opened 4 years ago

amritansh22 commented 4 years ago

The expected value of C and sigma is 0.3 and 0.1 This combination gives an error 0.04. But the combination 3 and 0.1 gives an error 0.035 which is smaller than 0.04. Due to this my submission fails.

The expected code :

model = utils.svmTrain(X, y, 0.3, gaussianKernel, args=(0.1,))
predictions = utils.svmPredict(model, Xval)
print(np.mean(predictions != yval))

0.04

Whereas this one

model = utils.svmTrain(X, y, 3, gaussianKernel, args=(0.1,))
predictions = utils.svmPredict(model, Xval)
print(np.mean(predictions != yval))

0.035

malwaredllc commented 4 years ago

@amritansh22 How are you managing to submit the assignments using this repo? When I try to submit, I enter my email address and the token from the Coursera website, but I get the following error: URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)> Have you ran into this issue? Any help would be greatly appreciated!

PaulFenton commented 3 years ago

I am getting C=1 and sigma=0.1 to have error=0.035. The graded submission with these values is working fine for me.