Beta

Remove outliers

Description
Loading description...
Statistics
Mathematics
  • Please sign in or sign up to leave a comment.
  • BachMcCann Avatar

    In your kata's description, you have a typo in the examples section. You currently show "[1, 2, 3, 4] => Median 3.5 LQ 1.5 UQ 3.5". The Median should be "2.5", not "3.5".

  • B1ts Avatar

    You should explain how Q1 and Q3 are calculated.

    • tchaflich Avatar

      The description has a section on this:

      You can obtain these quartiles by first finding the median of the dataset, then using it to divide the data into two equal halves. If the original array has an odd number of values, do not include the median in the upper or lower half. If the original array has an even number of values, just split it equally.

      Is there anything missing or unclear about this description? Perhaps an example will help?

    • B1ts Avatar

      Maybe I'm just bad at reading instructions, but the way I read it: find median, split into 2 halves, and then... what? I guess an example could be helpful.

    • tchaflich Avatar

      Description should now be more clear

      • Normalized use of LQ and UQ (instead of occasionally calling them Q1 and Q3)
      • Added an example of splitting dataset into 4 quartiles using the median
      • Clarified process description
      Suggestion marked resolved by tchaflich 4 months ago
    • B1ts Avatar

      Seems a lot better. You got my satisfied vote ;-)

  • B1ts Avatar

    You can pass all random tests with the initial code. It looks like random tests aren't finished yet?

    • tchaflich Avatar

      There are 2 types of random test, one to ensure that you remove all outliers, the other to ensure that the data is unchanged if there are no outliers. Since the initial code just returns the data completely unchanged, this will pass cases where non-outliers are not removed.

      I'm not seeing that all random tests pass with initial code, just the ones that should. Can you confirm on your end?

      (eta: I have updated the tests now as well for accuracy and clarity)

    • tchaflich Avatar

      Updated random tests, let me know if you spot any more issues with those!

      Issue marked resolved by tchaflich 4 months ago
  • B1ts Avatar

    Assertion messages are poor: "expected [ Array(12) ] to deeply equal [ Array(10) ]"

  • B1ts Avatar

    Sample tests try to import "getQuartiles", which isn't defined anywhere.