Data Analysis and Machine Learning with Python for Absolute Beginners: Learn Data Analysis and build models with help of Excel and Python tools along with ... 4 in 1 Bookset (Data by Stanley Truck

Data Analysis and Machine Learning with Python for Absolute Beginners: Learn Data Analysis and build models with help of Excel and Python tools along with ... 4 in 1 Bookset (Data by Stanley Truck

Author:Stanley Truck [Truck, Stanley]
Language: eng
Format: azw3, epub
Published: 2020-10-07T00:00:00+00:00


In fact, the ROC curve generates a series of key points on the curve by constantly moving the "cut-off points" of the classifier.Let's explain the "cut-off point".Very often, when we judge whether a sample is a positive sample or a negative sample, we cannot say "yes (100%)" or "no (0%)".

Many classifiers (such as Bayesian classifier and neural network classifier) only output a classification probability, and then a cutoff point (or threshold probability) can be given. If the classification probability is greater than this cutoff point, the sample is judged as a positive sample, otherwise it is a negative sample.

For a sorted classification probability, a series of key points (FPR,TPR) on the curve will be generated by constantly moving the "cut-off point" of the classifier.These key points are just a curve, which is the ROC curve we are learning.  The following is a case to further illustrate the concept of "cut-off point".Assume that there are 20 samples in the test set (10 real positive and negative samples each), and shows the output results of the binary classifier (P stands for positive class label, and N stands for negative class label).

The following describes the drawing process of roc curve.When the truncation point is positive Infinity, the classification model will judge all samples as negative samples, so FP and TP are naturally 0, so FPR and TPR are also 0, so the coordinates of the first point of ROC curve are (0,0).

When the cut-off point (output probability) is set to 0.9, only the samples ranked first are judged as positive samples by the classifier, and at this time TP=1.There are 10 positive samples in these 20 samples, that is, P=10, so TPR=1/10=0.1.

At the same time, among all the samples judged as positive samples, there is no false positive sample that has been "wronged", that is, FP=0.There are also 10 negative samples, that is, N=10, so NPR=0/10=0.Therefore, the coordinates of the second point of the ROC curve are (0,0.1).

Similarly, when the cutoff point is set to 0.8, only the first two samples are judged as positive samples by the classifier.Therefore, TP=2, TPR=2/10=0.2.At the same time, there are no false positive samples, namely FP=0, NPR=0/10=0.Therefore, the coordinate of the third point of the curve is (0,0.2).

By analogy, when the cut-off points are constantly adjusted, all the key points can be drawn, and then these key points are connected to form the final ROC curve, which finally stays at the point (1,1).

If these key points are dense enough, the ROC curve shown is no longer jagged, but smooth.  After a long time, we introduced the drawing of ROC curve.You may ask, what is the use of this ROC curve?Simply put, ROC curve is used to evaluate the performance of different binary classification algorithms.How to evaluate the advantages and disadvantages of two classification algorithms?This will use another concept, AUC.

AUC

AUC is the abbreviation of Area Under Curve, which means "area under curve" as its name implies.The "curve" here is the ROC curve we mentioned earlier.AUC is



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
Whisky: Malt Whiskies of Scotland (Collins Little Books) by dominic roskrow(55937)
What's Done in Darkness by Kayla Perrin(26542)
Shot Through the Heart: DI Grace Fisher 2 by Isabelle Grey(19018)
The Fifty Shades Trilogy & Grey by E L James(18987)
Shot Through the Heart by Mercy Celeste(18893)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 10 by Isuna Hasekura and Jyuu Ayakura(17014)
Python GUI Applications using PyQt5 : The hands-on guide to build apps with Python by Verdugo Leire(16901)
Peren F. Statistics for Business and Economics...Essential Formulas 3ed 2025 by Unknown(16827)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 03 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16737)
Wolf & Parchment: New Theory Spice & Wolf, Vol. 01 by Isuna Hasekura and Jyuu Ayakura & Jyuu Ayakura(16358)
The Subtle Art of Not Giving a F*ck by Mark Manson(14287)
The 3rd Cycle of the Betrayed Series Collection: Extremely Controversial Historical Thrillers (Betrayed Series Boxed set) by McCray Carolyn(14084)
Stepbrother Stories 2 - 21 Taboo Story Collection (Brother Sister Stepbrother Stepsister Taboo Pseudo Incest Family Virgin Creampie Pregnant Forced Pregnancy Breeding) by Roxi Harding(13472)
Scorched Earth by Nick Kyme(12723)
Drei Generationen auf dem Jakobsweg by Stein Pia(10930)
Suna by Ziefle Pia(10856)
Scythe by Neal Shusterman(10292)
International Relations from the Global South; Worlds of Difference; First Edition by Arlene B. Tickner & Karen Smith(9489)
Successful Proposal Strategies for Small Businesses: Using Knowledge Management ot Win Govenment, Private Sector, and International Contracts 3rd Edition by Robert Frey(9332)
This is Going to Hurt by Adam Kay(9118)