rbbt-dm 1.1.55 → 1.1.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/vector/model.rb +5 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ab1295a1cb43602045e0c75226cc71e1b8eb8fbc7ce72f869f1636309745ad7
|
4
|
+
data.tar.gz: 0c6bd97a2e8c81deb4435531344fd5b145382ddafd06012e93d8695de89f3ff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f2b34158e345c703e60a94d7481e397add3651b0fc5fd7c80205b2c44ae9578e1ccac2b9d67e3679afa37f60d56fe3defed8fbd42c81765e1239b90e8bc06da
|
7
|
+
data.tar.gz: fc1d764b9a240b60bd1de30e22f534485f7319c0396b291e28b0fe1ad48acde7cdeb5de7448509550892cd17e743b5388348f1f40584233280b5ec42cc95940c
|
data/lib/rbbt/vector/model.rb
CHANGED
@@ -294,15 +294,16 @@ cat(paste(label, sep="\\n", collapse="\\n"));
|
|
294
294
|
good_label = labels.uniq.select{|l| l.to_s == "true"}.first if good_label.nil?
|
295
295
|
good_label = labels.uniq.select{|l| l.to_s == "1"}.first if good_label.nil?
|
296
296
|
good_label = labels.uniq.sort.first if good_label.nil?
|
297
|
+
good_label = good_label.to_s
|
297
298
|
|
298
299
|
test.zip(predicted).each do |gs,pred|
|
299
300
|
gs = gs.to_s
|
300
301
|
pred = pred.to_s
|
301
302
|
|
302
|
-
tp += 1 if
|
303
|
-
|
304
|
-
|
305
|
-
fn += 1 if
|
303
|
+
tp += 1 if pred == good_label && gs == good_label
|
304
|
+
fp += 1 if pred == good_label && gs != good_label
|
305
|
+
tn += 1 if pred != good_label && gs != good_label
|
306
|
+
fn += 1 if pred != good_label && gs == good_label
|
306
307
|
end
|
307
308
|
|
308
309
|
p = tp + fn
|