normal_distribution 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/lib/normal_distribution.rb +3 -0
- data/lib/normal_distribution/model.rb +25 -15
- data/lib/normal_distribution/version.rb +2 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcab113574f1fccfbfdb5652468461ffc009a5f6
|
4
|
+
data.tar.gz: 877e57cd9026fcad6049d06b3a5824ccadd6314b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a702d3cf3623a7b75e64804ce481abacec2d7d202a5b9fcd8a445cddb4a23227d18dc98ba338683954d80158fe69a2f1b13447b891e88dc410ca73483aa85a61
|
7
|
+
data.tar.gz: e8f18576f23f92172678618ed42a1b782816dd13587fedea8a2f32cc428c8350b427e95421ae24062fb65c3baa9d771ea73dd6700dd83ba28adaef28de5d2864
|
data/lib/normal_distribution.rb
CHANGED
@@ -1,21 +1,31 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module NormalDistribution
|
4
|
+
# Model class of normal distribution
|
5
|
+
#
|
6
|
+
# @since 0.1.0
|
4
7
|
class Model
|
5
|
-
#
|
6
|
-
#
|
7
|
-
|
8
|
-
# :
|
9
|
-
#
|
10
|
-
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
|
16
|
-
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
8
|
+
# @!parse [ruby]
|
9
|
+
#
|
10
|
+
# # @return [Float] mean of data contained in model
|
11
|
+
# attr_reader :mean
|
12
|
+
#
|
13
|
+
# # @return [Float] standard deviation of data contained in model
|
14
|
+
# attr_reader :standard_deviation
|
15
|
+
#
|
16
|
+
# # Initializes normal distribution model from given data
|
17
|
+
# #
|
18
|
+
# # @param values [Array<Numeric>] non-empty array of numbers representing data for normal distribution construction
|
19
|
+
# def initialize(values)
|
20
|
+
# # This is stub used for indexing
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
# # Calculates confidence interval for given percentage
|
24
|
+
# #
|
25
|
+
# # @param percentage [Numeric] a number in interval <0, 100> representing probability
|
26
|
+
# # @return [Array<Float>] an array containing 2 values, lower bound and upper_bound of confidence interval
|
27
|
+
# def confidence_interval(percentage)
|
28
|
+
# # This is stub used for indexing
|
29
|
+
# end
|
20
30
|
end
|
21
31
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: normal_distribution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dominik Čermák
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: yard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: Normal distribution model allows to create normal distribution from given
|
84
98
|
data.Initial reason to build this was to use it in anomaly detection in discrete
|
85
99
|
numerical data.
|