Day 5: Introduction to Correlation
-
SalvadorDali 9 years ago It is unimaginably sad to see such elementary task with a mistake... Hackerrank employers please verify your answers before creating a competition.
-
mschle 9 years ago I'm pretty sure I entered the correct answer, yet it gets rejected, what's the problem?
-
SalvadorDali 9 years ago I think I explained it clearly. Solution that hackarrank think is correct, is actually wrong.
-
mschle 9 years ago I can see that, but why doesn't it get fixed?
-
-
-
Siarhei_Karavai 9 years ago I do not know, which answer it accepts, but I'm pretty sure, that I've calculated coeffcients correctly and my answer is marked as wrong.
-
Siarhei_Karavai 9 years ago Ok, I got it. Incorrect rounding.
-
-
-
mschle 9 years ago As someone who solved it: there is a rounding error in the Pearson correlation. Enter a number 0.001 higher than you expect and it will work. Strange however that you can enter a correct Spearman coefficient and an incorrect Pearson correlation coefficient getting zero points.
-
ba205 9 years ago My code is correct, but I got a runtime error at 0.01 seconds, so I just ran it on my own computer and printed the results I got from there here. Why would this happen?
-
roush95 9 years ago For calculatins spearman's rank constant, both the datas are already sorted. So, difference in ranks comes 0 for all values. In that case spearsman constant should be 1 ?
-
PRASHANTB1984 9 years ago @SalvadorDali @Mschle @hermes_jr @Sergey_Karavay - tolerance for rounding has been re-included now. Deleting a thread which now has a comment with the solution in it though.
Sort 9 Discussions, By:
Please Log In in order to post a comment