MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / trueNegatives

Function trueNegatives

website-phishing/index.js:34–41  ·  view source on GitHub ↗
(yTrue, yPred)

Source from the content-addressed store, hash-verified

32}
33
34function trueNegatives(yTrue, yPred) {
35 return tf.tidy(() => {
36 const zero = tf.scalar(0);
37 return tf.logicalAnd(yTrue.equal(zero), yPred.equal(zero))
38 .sum()
39 .cast('float32');
40 });
41}
42
43// TODO(cais): Use tf.metrics.falsePositiveRate when available.
44function falsePositiveRate(yTrue, yPred) {

Callers 1

falsePositiveRateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected