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

Function falsePositives

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

Source from the content-addressed store, hash-verified

22import * as utils from './utils';
23
24function falsePositives(yTrue, yPred) {
25 return tf.tidy(() => {
26 const one = tf.scalar(1);
27 const zero = tf.scalar(0);
28 return tf.logicalAnd(yTrue.equal(zero), yPred.equal(one))
29 .sum()
30 .cast('float32');
31 });
32}
33
34function trueNegatives(yTrue, yPred) {
35 return tf.tidy(() => {

Callers 1

falsePositiveRateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected