hybridforest 0.9.0 → 0.10.0

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: 8d0af8ba6e658989bf55d0b8026822ab0be77020c189ffd056ffac3e7a393700
4
- data.tar.gz: 968c29d52088fe4ba28d93fcd3aedf7288d323f3a35ba000efde5b1673c10e2b
3
+ metadata.gz: fd85ad9a8081b634556371599f61557c0490c0694bdc24f8aa8d866d44ba0843
4
+ data.tar.gz: f58382ac2737bce52c85cdf83e27f3099190a0f52be8c159780033194c183dd8
5
5
  SHA512:
6
- metadata.gz: 2e7076a8cdea280c900f61c98a6f53715a335d7765a6861f028a6956a8c6599cbe233b5d3e867b0d55f9a8889e41067e314ca151b00e4455f55071ac407059f5
7
- data.tar.gz: dbf3dc47bfba70ff33e9452cc9232d5079651410a3eb319b29172992141c1602f8c06bba50e7ee9a56c1c8530e9099763834b1a964a86cdc4ec4c89d944237f4
6
+ metadata.gz: c6678ba9cf3ccf15970801879a4d66f6ef98c8cf80353fc4ce2e9808f79063c447d19e96be374223403fedc093ac67cdd6599140df391ca68d05c708725ba4fc
7
+ data.tar.gz: 5c94ea5df0e6305719bf8ae9848a0a36d95d71fa51d7abe7bb09ed3f32720df98616bd3f2892e5c3467b647c9f6ebb7b89486e5cff771dde3141388d026fefe4
data/CHANGELOG.md CHANGED
@@ -30,4 +30,8 @@
30
30
 
31
31
  ## [0.9.0] - 2021-12-28
32
32
 
33
- - Update dependencies
33
+ - Update dependencies
34
+
35
+ ## [0.10.0] - 2021-12-29
36
+
37
+ - Refactor dataframe extensions
@@ -113,7 +113,7 @@ module HybridForest
113
113
  #
114
114
  def self.accuracy(predicted, actual)
115
115
  accurate = predicted.zip(actual).count { |p, a| equal_labels?(p, a) }
116
- accurate.to_f / predicted.count.to_f
116
+ accurate.to_f / predicted.count
117
117
  end
118
118
 
119
119
  # Extensions to simplify common dataframe operations.
@@ -146,11 +146,11 @@ module HybridForest
146
146
  end
147
147
 
148
148
  def feature_count(without_label: true)
149
- without_label ? names.count - 1 : names.count
149
+ without_label ? features.count : names.count
150
150
  end
151
151
 
152
152
  def pure?
153
- column_by_index(-1).uniq.size == 1
153
+ self[label].uniq.size == 1
154
154
  end
155
155
 
156
156
  def features
@@ -158,7 +158,7 @@ module HybridForest
158
158
  end
159
159
 
160
160
  def count_labels
161
- column_by_index(-1).tally
161
+ self[label].tally
162
162
  end
163
163
 
164
164
  def label
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HybridForest
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybridforest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - hi-tech-jazz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-28 00:00:00.000000000 Z
11
+ date: 2021-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake