analytica 0.0.10 → 0.0.11
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.
- data/lib/analytica.rb +1 -1
- data/lib/computation.rb +2 -2
- data/lib/visualization.rb +8 -7
- metadata +3 -3
data/lib/analytica.rb
CHANGED
data/lib/computation.rb
CHANGED
@@ -169,9 +169,9 @@ module Analytica
|
|
169
169
|
def exponential_moving_average(params)
|
170
170
|
enforce_map!({
|
171
171
|
:samples => :integer,
|
172
|
-
:alpha=> :float}, params)
|
172
|
+
:alpha => :float}, params)
|
173
173
|
|
174
|
-
moving_average(:decay => :exponential, :samples =>
|
174
|
+
moving_average(:decay => :exponential, :samples => self.size, :alpha => params[:alpha])
|
175
175
|
end
|
176
176
|
|
177
177
|
alias_method :ema, :exponential_moving_average
|
data/lib/visualization.rb
CHANGED
@@ -218,13 +218,14 @@ module Analytica
|
|
218
218
|
|
219
219
|
options.merge!(color)
|
220
220
|
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
221
|
+
if @labels_set
|
222
|
+
label = {
|
223
|
+
:axis_with_labels => ['x', 'y' ,'r'],
|
224
|
+
:axis_labels => @labels
|
225
|
+
}
|
226
|
+
|
227
|
+
options.merge!(label)
|
228
|
+
end
|
228
229
|
|
229
230
|
Gchart.line(options)
|
230
231
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: analytica
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 11
|
10
|
+
version: 0.0.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Raeez Lorgat
|