binary_decision_tree 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/binary_decision_tree/marshalled_tree.rb +16 -0
- data/lib/binary_decision_tree/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 176ae688844b3180f70e7e93c296021d912a3f3a
|
4
|
+
data.tar.gz: 25a0425eab814205ecaf117ae423f96fc10f4f11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0de132231ce543a3158a1fc14dbd40b3f28bb4a423ce435855730cb60b4acec2eebb75fd699394f8fb2f44ad1726c08ddd95fc20344d638445ab49f24421e41d
|
7
|
+
data.tar.gz: 4e4ae80ec858a40e10125b4f1620d76183b3fc5209cd4a30e3624e8060311f5c454394239ce30c39eb71cf67fc6bf8196a616c028e41dbdcbe644daeb98898e1
|
@@ -43,5 +43,21 @@ module BinaryDecisionTree
|
|
43
43
|
|
44
44
|
tree
|
45
45
|
end
|
46
|
+
|
47
|
+
def ==(obj)
|
48
|
+
obj.class == self.class && obj.state == state
|
49
|
+
end
|
50
|
+
|
51
|
+
alias_method :eql?, :==
|
52
|
+
|
53
|
+
def hash
|
54
|
+
state.hash
|
55
|
+
end
|
56
|
+
|
57
|
+
protected
|
58
|
+
|
59
|
+
def state
|
60
|
+
[depth, decisions, mask]
|
61
|
+
end
|
46
62
|
end
|
47
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binary_decision_tree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Haruska
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.2
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: A binary decision tree
|