lite-statistics 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 06e80ca142cea5c2b47ca54d08b93f50807b5dba0f159783850382351d686b68
4
- data.tar.gz: 9b39a00bc5191edfb9f3546ed6c9586ce8ef0e8232e59aee68218bfdb1bdb37a
3
+ metadata.gz: e04bb561d9e72db744d7c0bdcc367266dd1b6c1255ec6690aadc932a8030e946
4
+ data.tar.gz: 03110c348899191d55ab411d716edd90fe62c99e829e4a3db899168c93efbad9
5
5
  SHA512:
6
- metadata.gz: 8a794cb73651bf86dc994ab47c405cc78ed3f29dfabf164638f9d0797f068978e11a1781d56351c1db8b9023be3d28292812edd9034ac9cf9b74ce68e7c3d004
7
- data.tar.gz: ba5b2b354eedd4d98e95cf3691480e70110591e6f67b55d640af9d7e47accb41d17e1707c6f261626d2cc7570deef912a4aab513829eac66ca86ebd59cbe4ce0
6
+ metadata.gz: 8dd5917de35a1a857bbb2ef7730b715b48d74b8157e02b7b84fe1973e6203cbb86c9f634c4cf9bba5bfa7fef7c01c4a12cff2e0f926d25ec080116e56c4ba594
7
+ data.tar.gz: 754c6035decae068e801374dadcab618d4c51aa780f073ee6e8b347b8ad20a41deb5cb323c5fbee409caaa9045d23bab909280aa2fd3e6fb024762ef09e50e21
@@ -6,10 +6,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2019-07-18
10
+ ### Changed
11
+ - Rename zscores to zscoress
12
+
9
13
  ## [1.0.1] - 2019-07-18
10
14
  ### Changed
11
15
  - Memoization to use Lite::Memoize::Alias for more speed
12
- - Rename zscore to zscores
13
16
  - Rework benchmarks
14
17
 
15
18
  ## [1.0.0] - 2019-07-13
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-statistics (1.0.1)
4
+ lite-statistics (1.0.2)
5
5
  lite-memoize
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -80,7 +80,7 @@ Ex: `variance` => `sample_variance`
80
80
  * [Sample|Population Standard Deviation](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/STANDARD_DEVIATION.md)
81
81
  * [Sample|Population Coefficient of Variation](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/COEFFICIENT_OF_VARIATION.md)
82
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)
83
+ * [Sample|Population Z-Scores](https://github.com/drexed/lite-statistics/blob/master/docs/descriptive/ZSCORES.md)
84
84
 
85
85
  #### Shape
86
86
 
@@ -1,6 +1,6 @@
1
- # Sample|Population Z-Score
1
+ # Sample|Population Z-Scores
2
2
 
3
- Alias: `zscore`
3
+ Alias: `zscores`
4
4
 
5
5
  ```ruby
6
6
  collection = [1, 1, 2, 3, 10]
@@ -12,13 +12,13 @@ results = {
12
12
  }
13
13
 
14
14
  klass = Lite::Statistics::Descriptive.new(collection)
15
- klass.sample_zscore
15
+ klass.sample_zscores
16
16
 
17
17
  # - or -
18
18
 
19
- Lite::Statistics::Descriptive.population_zscore(collection)
19
+ Lite::Statistics::Descriptive.population_zscores(collection)
20
20
 
21
21
  # - or -
22
22
 
23
- collection.sample_zscore
23
+ collection.sample_zscores
24
24
  ```
@@ -10,9 +10,9 @@ module Lite
10
10
  frequencies max mean median midrange min mode proportions percentile_from_value
11
11
  population_coefficient_of_variation population_kurtosis population_size population_skewness
12
12
  population_standard_deviation population_standard_error population_summary
13
- population_variance population_zscore range sample_coefficient_of_variation sample_kurtosis
13
+ population_variance population_zscores range sample_coefficient_of_variation sample_kurtosis
14
14
  sample_size sample_skewness sample_standard_deviation sample_standard_error sample_summary
15
- sample_variance sample_zscore sum value_from_percentile
15
+ sample_variance sample_zscores sum value_from_percentile
16
16
  ].freeze
17
17
 
18
18
  def initialize(collection)
@@ -157,7 +157,7 @@ module Lite
157
157
  population_standard_deviation: population_standard_deviation,
158
158
  population_standard_error: population_standard_error,
159
159
  population_variance: population_variance,
160
- population_zscore: population_zscore
160
+ population_zscores: population_zscores
161
161
  )
162
162
  end
163
163
 
@@ -169,7 +169,7 @@ module Lite
169
169
 
170
170
  memoize :population_variance
171
171
 
172
- def population_zscore
172
+ def population_zscores
173
173
  return if size < 2
174
174
  return Hash.new(0) if population_standard_deviation.zero?
175
175
 
@@ -178,7 +178,7 @@ module Lite
178
178
  end
179
179
  end
180
180
 
181
- memoize :population_zscore
181
+ memoize :population_zscores
182
182
 
183
183
  def midrange
184
184
  return if @collection.empty?
@@ -270,7 +270,7 @@ module Lite
270
270
  sample_standard_deviation: sample_standard_deviation,
271
271
  sample_standard_error: sample_standard_error,
272
272
  sample_variance: sample_variance,
273
- sample_zscore: sample_zscore
273
+ sample_zscores: sample_zscores
274
274
  )
275
275
  end
276
276
 
@@ -285,8 +285,7 @@ module Lite
285
285
  memoize :sample_variance
286
286
  alias variance sample_variance
287
287
 
288
- # TODO: rename this to zscores
289
- def sample_zscore
288
+ def sample_zscores
290
289
  return if size < 2
291
290
  return Hash.new(0) if sample_standard_deviation.zero?
292
291
 
@@ -295,8 +294,8 @@ module Lite
295
294
  end
296
295
  end
297
296
 
298
- memoize :sample_zscore
299
- alias zscore sample_zscore
297
+ memoize :sample_zscores
298
+ alias zscores sample_zscores
300
299
 
301
300
  def sum
302
301
  @collection.sum
@@ -19,6 +19,6 @@ module Enumerable
19
19
  alias standard_error sample_standard_error
20
20
  alias summary sample_summary
21
21
  alias variance sample_variance
22
- alias zscore sample_zscore
22
+ alias zscores sample_zscores
23
23
 
24
24
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Statistics
5
5
 
6
- VERSION ||= '1.0.1'
6
+ VERSION ||= '1.0.2'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
@@ -183,7 +183,7 @@ files:
183
183
  - docs/descriptive/SUMMARY.md
184
184
  - docs/descriptive/VALUE_FROM_PERCENTILE.md
185
185
  - docs/descriptive/VARIANCE.md
186
- - docs/descriptive/ZSCORE.md
186
+ - docs/descriptive/ZSCORES.md
187
187
  - lib/generators/lite/statistics/install_generator.rb
188
188
  - lib/generators/lite/statistics/templates/install.rb
189
189
  - lib/lite/statistics.rb