lite-statistics 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/.fasterer.yml +19 -0
  3. data/.gitignore +11 -0
  4. data/.rspec +4 -0
  5. data/.rubocop.yml +24 -0
  6. data/.travis.yml +24 -0
  7. data/CHANGELOG.md +11 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +6 -0
  10. data/Gemfile.lock +119 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +165 -0
  13. data/Rakefile +8 -0
  14. data/_config.yml +1 -0
  15. data/benchmarks/descriptive_statistics.rb +60 -0
  16. data/bin/console +15 -0
  17. data/bin/setup +8 -0
  18. data/docs/.DS_Store +0 -0
  19. data/docs/descriptive/COEFFICIENT_OF_VARIATION.md +19 -0
  20. data/docs/descriptive/FREQUENCIES.md +22 -0
  21. data/docs/descriptive/KURTOSIS.md +19 -0
  22. data/docs/descriptive/MAX.md +17 -0
  23. data/docs/descriptive/MEAN.md +19 -0
  24. data/docs/descriptive/MEDIAN.md +17 -0
  25. data/docs/descriptive/MIDRANGE.md +19 -0
  26. data/docs/descriptive/MIN.md +17 -0
  27. data/docs/descriptive/MODE.md +17 -0
  28. data/docs/descriptive/PERCENTILE_FROM_VALUE.md +19 -0
  29. data/docs/descriptive/PROPORTIONS.md +22 -0
  30. data/docs/descriptive/RANGE.md +17 -0
  31. data/docs/descriptive/SIZE.md +19 -0
  32. data/docs/descriptive/SKEWNESS.md +19 -0
  33. data/docs/descriptive/STANDARD_DEVIATION.md +19 -0
  34. data/docs/descriptive/STANDARD_ERROR.md +19 -0
  35. data/docs/descriptive/SUM.md +17 -0
  36. data/docs/descriptive/SUMMARY.md +25 -0
  37. data/docs/descriptive/VALUE_FROM_PERCENTILE.md +19 -0
  38. data/docs/descriptive/VARIANCE.md +19 -0
  39. data/docs/descriptive/ZSCORE.md +24 -0
  40. data/lib/generators/lite/statistics/install_generator.rb +17 -0
  41. data/lib/generators/lite/statistics/templates/install.rb +5 -0
  42. data/lib/lite/statistics.rb +9 -0
  43. data/lib/lite/statistics/base.rb +19 -0
  44. data/lib/lite/statistics/configuration.rb +29 -0
  45. data/lib/lite/statistics/descriptive.rb +361 -0
  46. data/lib/lite/statistics/enumerable.rb +24 -0
  47. data/lib/lite/statistics/version.rb +9 -0
  48. data/lite-statistics.gemspec +48 -0
  49. metadata +202 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 2db1085bd25f7d8b5f5b8c57d18fcdfa6f424fa687cee53977b8dd9d0b52d96e
4
+ data.tar.gz: aad4b995ef4f84e66f8ba9dedb3bd5f2400c85b863817f1acf8c981bd344aab8
5
+ SHA512:
6
+ metadata.gz: b9da0a85047519f89c829b579dd17e5bf2d11e16faf91d47eb111494dc6390a9471c92ba593e4f2cb98bfcfda6a925cb3de23aca21a014c9bc9ae35906d399d1
7
+ data.tar.gz: 56074fa5ef45511ce6a9f2f60d3e097ba892ca5c3703c4f4ac888f1e30e11aeef0168202b42be935524bee9b84a5cc5de8b124523dea0650c566e58b62e54920
data/.fasterer.yml ADDED
@@ -0,0 +1,19 @@
1
+ speedups:
2
+ block_vs_symbol_to_proc: true
3
+ each_with_index_vs_while: false
4
+ fetch_with_argument_vs_block: true
5
+ for_loop_vs_each: true
6
+ getter_vs_attr_reader: true
7
+ gsub_vs_tr: true
8
+ hash_merge_bang_vs_hash_brackets: true
9
+ keys_each_vs_each_key: true
10
+ map_flatten_vs_flat_map: true
11
+ module_eval: true
12
+ proc_call_vs_yield: true
13
+ rescue_vs_respond_to: true
14
+ reverse_each_vs_reverse_each: true
15
+ select_first_vs_detect: true
16
+ select_last_vs_reverse_detect: true
17
+ setter_vs_attr_writer: true
18
+ shuffle_first_vs_sample: true
19
+ sort_vs_sort_by: true
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --backtrace
2
+ --color
3
+ --format progress
4
+ --order random
data/.rubocop.yml ADDED
@@ -0,0 +1,24 @@
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+ AllCops:
5
+ TargetRubyVersion: 2.6
6
+ DisplayCopNames: true
7
+ DisplayStyleGuide: true
8
+ LineLength:
9
+ Max: 100
10
+ Layout/EmptyLinesAroundBlockBody:
11
+ Exclude:
12
+ - 'spec/**/**/*'
13
+ Layout/EmptyLinesAroundClassBody:
14
+ EnforcedStyle: empty_lines_except_namespace
15
+ Layout/EmptyLinesAroundModuleBody:
16
+ EnforcedStyle: empty_lines_except_namespace
17
+ Metrics/BlockLength:
18
+ Enabled: false
19
+ Metrics/ClassLength:
20
+ Enabled: false
21
+ Style/Documentation:
22
+ Enabled: false
23
+ Style/ExpandPathArguments:
24
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,24 @@
1
+ sudo: false
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.5
6
+ - 2.6
7
+ - ruby-head
8
+ matrix:
9
+ fast_finish: true
10
+ allow_failures:
11
+ - rvm: ruby-head
12
+ before_install:
13
+ - gem update --system
14
+ - gem install bundler
15
+ install:
16
+ - bundle install --jobs=3 --retry=3
17
+ script:
18
+ - bundle exec rspec
19
+ - bundle exec rubocop
20
+ - bundle exec fasterer
21
+ notifications:
22
+ email: false
23
+ slack:
24
+ secure: o1cPyPWOqvUKesB1mrlpdWrV938/mASBGP7FnKTgwGwWGc745RUI0S+oWIYDMHL2YwpqkjVuRfY3yXdsJ1lpFp7xbnESFoiGXDBI0cUS5FPVqZEoGJdb3gXwc4OrdwR6aRjYFqXgi543TdVG/dyJLcVIwRsq9sqUE9tpEmhYL5UFswq0xqz8Tv5Cm8hO8urAcD0IVAPS6c3iuWem/bVxgv19QVcSvlPImZ2TmWgSElQyCpwk5qgh4vfDEl9W/KmYYnHIQ6zQ6MXU06kTA1pFJFW3XlSZRIBfc98ZKvXWGjk6GZ0tR5QjgzIyynhPDNsYjvB6Jm9+8H4KSeIkx7jXe1YivJ8HHlny0PYIO5md6lPvUdQOYGhwQ0g27xq4MNuQdiO4X1v2fRkO+Im5Gf9o921mc5FlS16th68j2ODy2kl/JL3DAW2GBLYhtBVKbppj/feJh3zkGnp7Gk2Rl4pf2kgJ9c6SaQXqCx3lA58ptBEtPJyvlXtxfdRptbT18RSpW6Ukhu7TfGo0DC/WprPB1Qg2HLGlC3eqCi70zqNmu8uUx8nEJh3silBT/1eV1TVY96QZIbDteGMVLM/DPh6AxSIDTuZX/pP7/dcnyI//ZR/+dkhGuqYzglbdqGxM4hwUSXEadzqLU6A1Gsn6PDdb6/FotRX3jhAjV4rVVgdhlIU=
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0] - 2019-07-13
10
+ ### Added
11
+ - Initial project version
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at j.gomez@drexed.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in lite-statistics.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ lite-statistics (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ actionpack (5.2.3)
10
+ actionview (= 5.2.3)
11
+ activesupport (= 5.2.3)
12
+ rack (~> 2.0)
13
+ rack-test (>= 0.6.3)
14
+ rails-dom-testing (~> 2.0)
15
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
16
+ actionview (5.2.3)
17
+ activesupport (= 5.2.3)
18
+ builder (~> 3.1)
19
+ erubi (~> 1.4)
20
+ rails-dom-testing (~> 2.0)
21
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
22
+ activesupport (5.2.3)
23
+ concurrent-ruby (~> 1.0, >= 1.0.2)
24
+ i18n (>= 0.7, < 2)
25
+ minitest (~> 5.1)
26
+ tzinfo (~> 1.1)
27
+ ast (2.4.0)
28
+ builder (3.2.3)
29
+ colorize (0.8.1)
30
+ concurrent-ruby (1.1.5)
31
+ crass (1.0.4)
32
+ diff-lcs (1.3)
33
+ erubi (1.8.0)
34
+ fasterer (0.6.0)
35
+ colorize (~> 0.7)
36
+ ruby_parser (>= 3.13.0)
37
+ generator_spec (0.9.4)
38
+ activesupport (>= 3.0.0)
39
+ railties (>= 3.0.0)
40
+ i18n (1.6.0)
41
+ concurrent-ruby (~> 1.0)
42
+ jaro_winkler (1.5.3)
43
+ loofah (2.2.3)
44
+ crass (~> 1.0.2)
45
+ nokogiri (>= 1.5.9)
46
+ method_source (0.9.2)
47
+ mini_portile2 (2.4.0)
48
+ minitest (5.11.3)
49
+ nokogiri (1.10.3)
50
+ mini_portile2 (~> 2.4.0)
51
+ parallel (1.17.0)
52
+ parser (2.6.3.0)
53
+ ast (~> 2.4.0)
54
+ rack (2.0.7)
55
+ rack-test (1.1.0)
56
+ rack (>= 1.0, < 3)
57
+ rails-dom-testing (2.0.3)
58
+ activesupport (>= 4.2.0)
59
+ nokogiri (>= 1.6)
60
+ rails-html-sanitizer (1.0.4)
61
+ loofah (~> 2.2, >= 2.2.2)
62
+ railties (5.2.3)
63
+ actionpack (= 5.2.3)
64
+ activesupport (= 5.2.3)
65
+ method_source
66
+ rake (>= 0.8.7)
67
+ thor (>= 0.19.0, < 2.0)
68
+ rainbow (3.0.0)
69
+ rake (12.3.2)
70
+ rspec (3.8.0)
71
+ rspec-core (~> 3.8.0)
72
+ rspec-expectations (~> 3.8.0)
73
+ rspec-mocks (~> 3.8.0)
74
+ rspec-core (3.8.2)
75
+ rspec-support (~> 3.8.0)
76
+ rspec-expectations (3.8.4)
77
+ diff-lcs (>= 1.2.0, < 2.0)
78
+ rspec-support (~> 3.8.0)
79
+ rspec-mocks (3.8.1)
80
+ diff-lcs (>= 1.2.0, < 2.0)
81
+ rspec-support (~> 3.8.0)
82
+ rspec-support (3.8.2)
83
+ rubocop (0.72.0)
84
+ jaro_winkler (~> 1.5.1)
85
+ parallel (~> 1.10)
86
+ parser (>= 2.6)
87
+ rainbow (>= 2.2.2, < 4.0)
88
+ ruby-progressbar (~> 1.7)
89
+ unicode-display_width (>= 1.4.0, < 1.7)
90
+ rubocop-performance (1.4.0)
91
+ rubocop (>= 0.71.0)
92
+ rubocop-rspec (1.33.0)
93
+ rubocop (>= 0.60.0)
94
+ ruby-progressbar (1.10.1)
95
+ ruby_parser (3.13.1)
96
+ sexp_processor (~> 4.9)
97
+ sexp_processor (4.12.1)
98
+ thor (0.20.3)
99
+ thread_safe (0.3.6)
100
+ tzinfo (1.2.5)
101
+ thread_safe (~> 0.1)
102
+ unicode-display_width (1.6.0)
103
+
104
+ PLATFORMS
105
+ ruby
106
+
107
+ DEPENDENCIES
108
+ bundler
109
+ fasterer
110
+ generator_spec
111
+ lite-statistics!
112
+ rake
113
+ rspec
114
+ rubocop
115
+ rubocop-performance
116
+ rubocop-rspec
117
+
118
+ BUNDLED WITH
119
+ 2.0.1
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Juan Gomez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,165 @@
1
+ # Lite::Statistics
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/lite-statistics.svg)](http://badge.fury.io/rb/lite-statistics)
4
+ [![Build Status](https://travis-ci.org/drexed/lite-statistics.svg?branch=master)](https://travis-ci.org/drexed/lite-statistics)
5
+
6
+ Lite::Statistics is a library for generate statistics from collections of data points.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'lite-statistics'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install lite-statistics
23
+
24
+ ## Table of Contents
25
+
26
+ * [Configurations](#configurations)
27
+ * [Descriptive](#descriptive)
28
+ * [Monkey patches](#monkey-patches)
29
+ * [Benchmarks](#benchmarks)
30
+
31
+ ## Configurations
32
+
33
+ `rails g lite:statistics:install` will generate the following file:
34
+ `../config/initalizers/lite-statistics.rb`
35
+
36
+ ```ruby
37
+ Lite::Statistics.configure do |config|
38
+ config.monkey_patches = true
39
+ end
40
+ ```
41
+
42
+ ## Descriptive
43
+
44
+ Sample|Population calculations will have a shorthand alias that defaults to sample.
45
+
46
+ Ex: `variance` => `sample_variance`
47
+
48
+ #### Summary
49
+
50
+ * [Sample|Population Summary](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/SUMMARY.md)
51
+
52
+ #### Count
53
+
54
+ * [Sum](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/SUM.md)
55
+ * [Sample|Population Size](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/SIZE.md)
56
+
57
+ #### Distribution
58
+
59
+ * [Frequencies](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/FREQUENCIES.md)
60
+ * [Min](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MIN.md)
61
+ * [Max](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MAX.md)
62
+ * [Proportions](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/PROPORTIONS.md)
63
+
64
+ #### Central tendency
65
+
66
+ * [Mean](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MEAN.md) aka Average
67
+ * [Median](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MEDIAN.md)
68
+ * [Mode](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MODE.md)
69
+
70
+ #### Dispersion
71
+
72
+ * [Midrange](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/MIDRANGE.md) aka Midextreme
73
+ * [Range](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/RANGE.md)
74
+ * [Percentile from Value](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/PERCENTILE_FROM_VALUE.md) aka Percentile
75
+ * [Value from Percentile](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/VALUE_FROM_PERCENTILE.md) aka Percentile Rank
76
+
77
+ #### Spread
78
+
79
+ * [Sample|Population Variance](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/VARIANCE.md)
80
+ * [Sample|Population Standard Deviation](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/STANDARD_DEVIATION.md)
81
+ * [Sample|Population Coefficient of Variation](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/COEFFICIENT_OF_VARIATION.md)
82
+ * [Sample|Population Standard Error](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/STANDARD_ERROR.md)
83
+ * [Sample|Population Z-Score](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/ZSCORE.md)
84
+
85
+ #### Shape
86
+
87
+ * [Sample|Population Skewness](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/SKEWNESS.md)
88
+ * [Sample|Population Kurtosis](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/KURTOSIS.md)
89
+
90
+ ## Monkey patches
91
+
92
+ Including monkey patches will give you `Enumerable` access to statistics.
93
+
94
+ ```ruby
95
+ [1, 2, 3, 1].mode #=> 1
96
+ ```
97
+
98
+ ## Benchmarks
99
+
100
+ All benchmarks are ran using the summary of calculations as this will test against all calculations.
101
+
102
+ You can execute all benchmarks locally using the following command:
103
+
104
+ ```ruby
105
+ # From the project folder:
106
+ ruby benchmarks/descriptive_statistics.rb
107
+ ```
108
+
109
+ #### vs Descriptive Statistics
110
+
111
+ Repo: [Github](https://github.com/thirtysixthspan/descriptive_statistics)
112
+
113
+ ```ruby
114
+ # lite-statistics => 22 calculations
115
+ # descriptive_statistics => 13 calculations
116
+
117
+ Warming up --------------------------------------
118
+ lite-statistics 1.000 i/100ms
119
+ descriptive_statistics
120
+ 1.000 i/100ms
121
+ Calculating -------------------------------------
122
+ lite-statistics 1.191 (± 0.0%) i/s - 6.000 in 5.049012s
123
+ descriptive_statistics
124
+ 0.560 (± 0.0%) i/s - 3.000 in 5.357009s
125
+
126
+ Comparison:
127
+ lite-statistics: 1.2 i/s
128
+ descriptive_statistics: 0.6 i/s - 2.13x slower
129
+ ```
130
+
131
+ ```ruby
132
+ # lite-statistics => 13 calculations
133
+ # descriptive_statistics => 13 calculations
134
+
135
+ Warming up --------------------------------------
136
+ lite-statistics 1.000 i/100ms
137
+ descriptive_statistics
138
+ 1.000 i/100ms
139
+ Calculating -------------------------------------
140
+ lite-statistics 2.820 (± 0.0%) i/s - 15.000 in 5.328247s
141
+ descriptive_statistics
142
+ 0.537 (± 0.0%) i/s - 3.000 in 5.589307s
143
+
144
+ Comparison:
145
+ lite-statistics: 2.8 i/s
146
+ descriptive_statistics: 0.5 i/s - 5.25x slower
147
+ ```
148
+
149
+ ## Development
150
+
151
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
152
+
153
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
154
+
155
+ ## Contributing
156
+
157
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lite-statistics. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
158
+
159
+ ## License
160
+
161
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
162
+
163
+ ## Code of Conduct
164
+
165
+ Everyone interacting in the Lite::Statistics project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/lite-statistics/blob/master/CODE_OF_CONDUCT.md).