glymour 0.0.1 → 0.0.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.
- data/lib/glymour/version.rb +1 -1
- data/lib/stats_module.rb +5 -1
- metadata +3 -3
data/lib/glymour/version.rb
CHANGED
data/lib/stats_module.rb
CHANGED
@@ -43,7 +43,11 @@ module Glymour
|
|
43
43
|
|
44
44
|
# Gives an array of all variable values in table
|
45
45
|
def values
|
46
|
-
|
46
|
+
if variable_container.table < ActiveRecord
|
47
|
+
intervals ? variable_container.table.all.map { |row| location_in_interval(row) } : variable_container.table.map { |r| @block.call(r) }
|
48
|
+
else
|
49
|
+
intervals ? variable_container.table.map { |row| location_in_interval(row) } : variable_container.table.map(&@block)
|
50
|
+
end
|
47
51
|
end
|
48
52
|
|
49
53
|
# Gives the location of a column value within a finite set of interval values (i.e. gives discrete state after classing a continuous variable)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glymour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Stanwyck
|