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

Function falsePositiveRate

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

Source from the content-addressed store, hash-verified

42
43// TODO(cais): Use tf.metrics.falsePositiveRate when available.
44function falsePositiveRate(yTrue, yPred) {
45 return tf.tidy(() => {
46 const fp = falsePositives(yTrue, yPred);
47 const tn = trueNegatives(yTrue, yPred);
48 return fp.div(fp.add(tn));
49 });
50}
51
52/**
53 * Draw a ROC curve.

Callers 2

drawROCFunction · 0.85
index.jsFile · 0.85

Calls 2

falsePositivesFunction · 0.85
trueNegativesFunction · 0.85

Tested by

no test coverage detected