https://github.com/yegor256/tukeyized
Ruby method that removes extreme data points from an array using Tukey's method
https://github.com/yegor256/tukeyized
ruby ruby-gem tukey-hsd
Last synced: 9 months ago
JSON representation
Ruby method that removes extreme data points from an array using Tukey's method
- Host: GitHub
- URL: https://github.com/yegor256/tukeyized
- Owner: yegor256
- License: mit
- Created: 2025-09-26T17:24:26.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-10-04T03:55:17.000Z (9 months ago)
- Last Synced: 2025-10-04T05:45:40.245Z (9 months ago)
- Topics: ruby, ruby-gem, tukey-hsd
- Language: Ruby
- Homepage: https://rubygems.org/gems/tukeyized
- Size: 43 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Remove Array Elements Using Tukey's Method
[](https://www.rultor.com/p/yegor256/tukeyized)
[](https://www.jetbrains.com/ruby/)
[](https://github.com/yegor256/tukeyized/actions/workflows/rake.yml)
[](https://www.0pdd.com/p?name=yegor256/tukeyized)
[](https://badge.fury.io/rb/tukeyized)
[](https://codecov.io/github/yegor256/tukeyized?branch=master)
[](https://rubydoc.info/github/yegor256/tukeyized/master/frames)
[](https://hitsofcode.com/view/github/yegor256/tukeyized)
[](https://github.com/yegor256/tukeyized/blob/master/LICENSE.txt)
This gem adds a simple `tukeyized` to the `Array` class.
The method returns a copy of the array without extreme values.
It uses the [Tukey's method].
```ruby
require 'tukeyized'
puts [1, 6, 3, 8888, 3, 2, 8, -19292].tukeyized
```
Prints:
```text
1, 6, 3, 3, 2, 8
```
That's it.
## How to contribute
Read
[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Make sure your build is green before you contribute
your pull request. You will need to have
[Ruby](https://www.ruby-lang.org/en/) 3.0+ and
[Bundler](https://bundler.io/) installed. Then:
```bash
bundle update
bundle exec rake
```
If it's clean and you don't see any error messages, submit your pull request.
[Tukey's method]: https://en.wikipedia.org/wiki/Tukey%27s_range_test