Ad
  • Custom User Avatar

    Hi! have the same problem. Got this on calculation First\Last Decile: i got First Decile = -74.4682544, should equal = -74.4682543999999, and Last = 587.1, should equal = 587.1000000000001.

    Maybe i dont understand but difference between mine and expected value less then 10**-10:

    abs(-74.4682544-(-74.4682543999999)) -> 9.947598300641403e-14 < 10**-10; 
    abs(587.1 - 587.1000000000001) -> 1.1368683772161603e-13 < 10**-10
    

    do you submit this kata?

  • Custom User Avatar

    1)Noone will anser me but i dont understand why when i test in jupyter lab StatisticalSummary(data).boxplot() with data = list(range(1, 33)) + list(range(12, 21)) + list(range(12, 21)) + list(range(12, 21)) + [16] + ['a']
    i got [('Sample', 12.75, 16.0, 20.0)] (the same as in the "Worked example # => [("Sample", 12.75, 16, 20)]")
    but when copy-pass to test here i got ('Sample', None) Σ(っ °Д °;)っ

    UPD: problem was in plot=BOXPLOT, in cata its defined not as string as i do - so its work now but with errors in calculation

    2)and also why in "Worked example":
    d1 = range(1, 33) + range(12, 21) + range(12, 21) + range(12, 21) + [16]
    d2 = [d - 2 for d in d1[:len(data)//2]] + [d + 2 for d in d1[len(data)//2:]] #we call for var "data" but not define it (or i think we use previously defined "data" in 1st example ???

    data = [("A", n) for n in d1] + [("B", n) for n in d2]
    i expect "data" to be smt like this: [(A, 1),(A, 2), (A, 3)...(B, 1), (B,2)...] but not this:
    Data: [('A', [1, 2, ...), , ('B', [-1, 0, 1,] (got it from incorrect tests) (╬▔皿▔)╯

    So ... i thinks there is some confusing examples or i just dont understend smt(((
    UPD1: not just Lower\Upper Outlier boundary but !!Smallest value!!

  • Custom User Avatar

    6 years past still have problems in discription or tests (

  • Custom User Avatar

    pls help, i got all test ok, exept 2: "27.99 should equal 27.98", "5.4 should equal 5.39". Get std and mean of sample -> create new_sample (remove outlier) -> check if len(sample) != len(new_sample) call clean_mean(new_sample, cutoff) -> return the result. For example with sample = [1.01, 0.99, 1.02, 1.01, 0.99, 0.97, 1.03, 0.99, 1.02, 0.99, 3, 10] and cutoff = 2 i call clean_mean 3 tiems (get rid of 10, 3, and return mean of [1.01, 0.99, 1.02, 1.01, 0.99, 0.97, 1.03, 0.99, 1.02, 0.99]