July 2018
Intermediate to advanced
334 pages
8h 20m
English
In this section, we want to come up with the number of false positives, the number of true positives, and the number of false negatives. First, we want to know how many false positives there are:
val fPs = positivesNegatives(labelAndPredictions, 0.0, 1.0)println("No of false negatives is: " + fPs)
Now, we want to know how many true positives there are:
val tPs = positivesNegatives(labelAndPredictions, 1.0, 1.0)
We also want to know how many false negatives exist:
val fNs = positivesNegatives(labelAndPredictions, 1.0, 0.0)
Now that we have fNs, tPs, and fPs, we can calculate the precision and recall metrics.
Read now
Unlock full access