Metrics for Multi-Class Classification: an Overview
Total Page:16
File Type:pdf, Size:1020Kb
Load more
Recommended publications
-
Chapter 8 Example
Chapter 8 Example Frequency Table Time spent travelling to school – to the nearest 5 minutes (Sample of Y7s) Time Frequency Per cent Valid per cent Cumulative per cent 5.00 4 7.4 7.4 7.4 10.00 10 18.5 18.5 25.9 15.00 20 37.0 37.0 63.0 Valid 20.00 15 27.8 27.8 90.7 25.00 3 5.6 5.6 96.3 35.00 2 3.7 3.7 100.0 Total 54 100.0 100.0 Using Pie Charts Pie chart showing relationship of something to a whole Children's Food Preferences Other 28% Chips 72% Ö © Mark O’Hara, Caron Carter, Pam Dewis, Janet Kay and Jonathan Wainwright 2011 O’Hara, M., Carter, C., Dewis, P., Kay, J., and Wainwright, J. (2011) Successful Dissertations. London: Continuum. Pie chart showing relationship of something to other categories Children's Food Preferences Fruit Ice Cream 2% 2% Biscuits 3% Pasta 11% Pizza 10% Chips 72% Using Bar Charts and Histograms Bar chart Mode of Travel to School (Y7s) 14 12 10 8 6 mode of travel 4 2 0 walk car bus cycle other Ö © Mark O’Hara, Caron Carter, Pam Dewis, Janet Kay and Jonathan Wainwright 2011 O’Hara, M., Carter, C., Dewis, P., Kay, J., and Wainwright, J. (2011) Successful Dissertations. London: Continuum. Histogram Number of students 50 40 30 20 10 0 0204060 80 100 Score on final exam (maximum possible = 100) Median and Mean The median and mean of these two sets of numbers is clearly 50, but the spread can be seen to differ markedly 48 49 50 51 52 30 40 50 60 70 © Mark O’Hara, Caron Carter, Pam Dewis, Janet Kay and Jonathan Wainwright 2011 O’Hara, M., Carter, C., Dewis, P., Kay, J., and Wainwright, J. -
Measures of Association for Contingency Tables
Newsom Psy 525/625 Categorical Data Analysis, Spring 2021 1 Measures of Association for Contingency Tables The Pearson chi-squared statistic and related significance tests provide only part of the story of contingency table results. Much more can be gleaned from contingency tables than just whether the results are different from what would be expected due to chance (Kline, 2013). For many data sets, the sample size will be large enough that even small departures from expected frequencies will be significant. And, for other data sets, we may have low power to detect significance. We therefore need to know more about the strength of the magnitude of the difference between the groups or the strength of the relationship between the two variables. Phi The most common measure of magnitude of effect for two binary variables is the phi coefficient. Phi can take on values between -1.0 and 1.0, with 0.0 representing complete independence and -1.0 or 1.0 representing a perfect association. In probability distribution terms, the joint probabilities for the cells will be equal to the product of their respective marginal probabilities, Pn( ij ) = Pn( i++) Pn( j ) , only if the two variables are independent. The formula for phi is often given in terms of a shortcut notation for the frequencies in the four cells, called the fourfold table. Azen and Walker Notation Fourfold table notation n11 n12 A B n21 n22 C D The equation for computing phi is a fairly simple function of the cell frequencies, with a cross- 1 multiplication and subtraction of the two sets of diagonal cells in the numerator. -
Extraction of User's Stays and Transitions from Gps Logs: a Comparison of Three Spatio-Temporal Clustering Approaches
MASTERARBEIT EXTRACTION OF USER’S STAYS AND TRANSITIONS FROM GPS LOGS: A COMPARISON OF THREE SPATIO-TEMPORAL CLUSTERING APPROACHES Ausgeführt am Institut für Geoinformation und Kartographie der Technischen Universität Wien unter der Anleitung von Univ.Prof. Mag.rer.nat. Dr.rer.nat. Georg Gartner, TU Wien Univ.Lektor Dipl.-Ing. Dr.techn. Karl Rehrl, TU Wien Mag. DI(FH) Cornelia Schneider, Salzburg Research durch Francisco Daniel Porras Bernárdez Austrasse 3b 209, 5020 Salzburg Wien, 25 January 2016 _______________________________ Unterschrift (Student) MASTER’S THESIS EXTRACTION OF USER’S STAYS AND TRANSITIONS FROM GPS LOGS: A COMPARISON OF THREE SPATIO-TEMPORAL CLUSTERING APPROACHES Conducted at the Institute for Geoinformation und Kartographie der Technischen Universität Wien under the supervision of Univ.Prof. Mag.rer.nat. Dr.rer.nat. Georg Gartner, TU Wien Univ.Lektor Dipl.-Ing. Dr.techn. Karl Rehrl, TU Wien Mag. DI(FH) Cornelia Schneider, Salzburg Research by Francisco Daniel Porras Bernárdez Austrasse 3b 209, 5020 Salzburg Wien, 25 January 2016 _______________________________ Signature (Student) ACKNOWLEDGEMENTS First of all, I would like to express my deepest gratitude to Dr. Georg Gartner and Dr. Karl Rehrl for their supervision as well as Mag. DI(FH) Cornelia Schneider and all the time they have deserved to my person. I really appreciate their patience and continuous support. I am also very grateful for the amazing opportunity that Salzburg Research Forschungsgesellschaft m.b.H. has given to me allowing me to develop my thesis during an internship at the institute. I will be always grateful for the confidence Dr. Rehrl and Mag. DI(FH) Schneider placed in me. -
Performance Measures Outline 1 Introduction 2 Binary Labels
CIS 520: Machine Learning Spring 2018: Lecture 10 Performance Measures Lecturer: Shivani Agarwal Disclaimer: These notes are designed to be a supplement to the lecture. They may or may not cover all the material discussed in the lecture (and vice versa). Outline • Introduction • Binary labels • Multiclass labels 1 Introduction So far, in supervised learning problems with binary (or multiclass) labels, we have focused mostly on clas- sification with the 0-1 loss (where the error on an example is zero if a model predicts the correct label and one if it predicts a wrong label). In many problems, however, performance is measured differently from the 0-1 loss. In general, for any learning problem, the choice of a learning algorithm should factor in the type of training data available, the type of model that is desired to be learned, and the performance measure that will be used to evaluate the model; in essence, the performance measure defines the objective of learning.1 Here we discuss a variety of performance measures used in practice in settings with binary as well as multiclass labels. 2 Binary Labels Say we are given training examples S = ((x1; y1);:::; (xm; ym)) with instances xi 2 X and binary labels yi 2 {±1g. There are several types of models one might want to learn; for example, the goal could be to learn a classification model h : X →{±1g that predicts the binary label of a new instance, or to learn a class probability estimation (CPE) model ηb : X![0; 1] that predicts the probability of a new instance having label +1, or to learn a ranking or scoring model f : X!R that assigns higher scores to positive instances than to negative ones. -
2 X 2 Contingency Chi-Square
Newsom Psy 522/622 Multiple Regression and Multivariate Quantitative Methods, Winter 2021 1 2 X 2 Contingency Chi-square The 2 X 2 contingency chi-square is used for the comparison of two groups with a dichotomous dependent variable. We might compare males and females on a yes/no response scale, for instance. The contingency chi-square is based on the same principles as the simple chi-square analysis in which we examine the expected vs. the observed frequencies. The computation is quite similar, except that the estimate of the expected frequency is a little harder to determine. Let’s use the Quinnipiac University poll data to examine the extent to which independents (non-party affiliated voters) support Biden and Trump.1 Here are the frequencies: Trump Biden Party affiliated 338 363 701 Independent 125 156 281 463 519 982 To answer the question whether Biden or Trump have a higher proportion of independent voters, we are making a comparison of the proportion of Biden supporters who are independents, 156/519 = .30, or 30.0%, to the proportion of Trump supporters who are independents, 125/463 = .27, or 27.0%. So, the table appears to suggest that Biden's supporters are more likely to be independents then Trump's supporters. Notice that this is a comparison of the conditional proportions, which correspond to column percentages in cross-tabulation 2 output. First, we need to compute the expected frequencies for each cell. R1 is the frequency for row 1, C1 is the frequency for row 2, and N is the total sample size. -
The Modification of the Phi-Coefficient Reducing Its Dependence on The
c Metho ds of Psychological Research Online 1997, Vol.2, No.1 1998 Pabst Science Publishers Internet: http://www.pabst-publishers.de/mpr/ The Mo di cation of the Phi-co ecient Reducing its Dep endence on the Marginal Distributions Peter V. Zysno Abstract The Phi-co ecient is a well known measure of correlation for dichotomous variables. It is worthy of remark, that the extreme values 1 only o ccur in the case of consistent resp onses and symmetric marginal frequencies. Con- sequently low correlations may be due to either inconsistent data, unequal resp onse frequencies or b oth. In order to overcome this somewhat confusing situation various alternative prop osals were made, which generally, remained rather unsatisfactory. Here, rst of all a system has b een develop ed in order to evaluate these measures. Only one of the well-known co ecients satis es the underlying demands. According to the criteria, the Phi-co ecientisac- companied by a formally similar mo di cation, which is indep endent of the marginal frequency distributions. Based on actual data b oth of them can b e easily computed. If the original data are not available { as usual in publica- tions { but the intercorrelations and resp onse frequencies of the variables are, then the grades of asso ciation for assymmetric distributions can b e calculated subsequently. Keywords: Phi-co ecient, indep endent marginal distributions, dichotomous variables 1 Intro duction In the b eginning of this century the Phi-co ecientYule 1912 was develop ed as a correlational measure for dichotomous variables. Its essential features can b e quickly outlined. -
The Difference Between Precision-Recall and ROC Curves for Evaluating the Performance of Credit Card Fraud Detection Models
Proc. of the 6th International Conference on Applied Innovations in IT, (ICAIIT), March 2018 The Difference Between Precision-recall and ROC Curves for Evaluating the Performance of Credit Card Fraud Detection Models Rustam Fayzrakhmanov, Alexandr Kulikov and Polina Repp Information Technologies and Computer-Based System Department, Perm National Research Polytechnic University, Komsomolsky Prospekt 29, 614990, Perm, Perm Krai, Russia [email protected], [email protected], [email protected] Keywords: Credit Card Fraud Detection, Weighted Logistic Regression, Random Undersampling, Precision- Recall curve, ROC Curve Abstract: The study is devoted to the actual problem of fraudulent transactions detecting with use of machine learning. Presently the receiver Operator Characteristic (ROC) curves are commonly used to present results for binary decision problems in machine learning. However, for a skewed dataset ROC curves don’t reflect the difference between classifiers and depend on the largest value of precision or recall metrics. So the financial companies are interested in high values of both precision and recall. For solving this problem the precision-recall curves are described as an approach. Weighted logistic regression is used as an algorithm- level technique and random undersampling is proposed as data-level technique to build credit card fraud classifier. To perform computations a logistic regression as a model for prediction of fraud and Python with sklearn, pandas and numpy libraries has been used. As a result of this research it is determined that precision-recall curves have more advantages than ROC curves in dealing with credit card fraud detection. The proposed method can be effectively used in the banking sector. -
Performance Measures Accuracy Confusion Matrix
Performance Measures • Accuracy Performance Measures • Weighted (Cost-Sensitive) Accuracy for Machine Learning • Lift • ROC – ROC Area • Precision/Recall – F – Break Even Point • Similarity of Various Performance Metrics via MDS (Multi-Dimensional Scaling) 1 2 Accuracy Confusion Matrix • Target: 0/1, -1/+1, True/False, … • Prediction = f(inputs) = f(x): 0/1 or Real Predicted 1 Predicted 0 correct • Threshold: f(x) > thresh => 1, else => 0 • If threshold(f(x)) and targets both 0/1: a b r True 1 1- targeti - threshold( f (x i )) ABS Â( ) accuracy = i=1KN N c d True 0 incorrect • #right / #total • p(“correct”): p(threshold(f(x)) = target) † threshold accuracy = (a+d) / (a+b+c+d) 3 4 1 Predicted 1 Predicted 0 Predicted 1 Predicted 0 true false TP FN Prediction Threshold True 1 positive negative True 1 Predicted 1 Predicted 0 false true FP TN 0 b • threshold > MAX(f(x)) True 1 True 0 positive negative True 0 • all cases predicted 0 • (b+d) = total 0 d • accuracy = %False = %0’s Predicted 1 Predicted 0 Predicted 1 Predicted 0 True 0 Predicted 1 Predicted 0 hits misses P(pr1|tr1) P(pr0|tr1) True 1 True 1 a 0 • threshold < MIN(f(x)) True 1 • all cases predicted 1 false correct • (a+c) = total P(pr1|tr0) P(pr0|tr0) c 0 • accuracy = %True = %1’s True 0 True 0 alarms rejections True 0 5 6 Problems with Accuracy • Assumes equal cost for both kinds of errors – cost(b-type-error) = cost (c-type-error) optimal threshold • is 99% accuracy good? – can be excellent, good, mediocre, poor, terrible – depends on problem 82% 0’s in data • is 10% accuracy bad? -
Basic ES Computations, P. 1 BASIC EFFECT SIZE GUIDE with SPSS
Basic ES Computations, p. 1 BASIC EFFECT SIZE GUIDE WITH SPSS AND SAS SYNTAX Gregory J. Meyer, Robert E. McGrath, and Robert Rosenthal Last updated January 13, 2003 Pending: 1. Formulas for repeated measures/paired samples. (d = r / sqrt(1-r^2) 2. Explanation of 'set aside' lambda weights of 0 when computing focused contrasts. 3. Applications to multifactor designs. SECTION I: COMPUTING EFFECT SIZES FROM RAW DATA. I-A. The Pearson Correlation as the Effect Size I-A-1: Calculating Pearson's r From a Design With a Dimensional Variable and a Dichotomous Variable (i.e., a t-Test Design). I-A-2: Calculating Pearson's r From a Design With Two Dichotomous Variables (i.e., a 2 x 2 Chi-Square Design). I-A-3: Calculating Pearson's r From a Design With a Dimensional Variable and an Ordered, Multi-Category Variable (i.e., a Oneway ANOVA Design). I-A-4: Calculating Pearson's r From a Design With One Variable That Has 3 or More Ordered Categories and One Variable That Has 2 or More Ordered Categories (i.e., an Omnibus Chi-Square Design with df > 1). I-B. Cohen's d as the Effect Size I-B-1: Calculating Cohen's d From a Design With a Dimensional Variable and a Dichotomous Variable (i.e., a t-Test Design). SECTION II: COMPUTING EFFECT SIZES FROM THE OUTPUT OF STATISTICAL TESTS AND TRANSLATING ONE EFFECT SIZE TO ANOTHER. II-A. The Pearson Correlation as the Effect Size II-A-1: Pearson's r From t-Test Output Comparing Means Across Two Groups. -
Robust Approximations to the Non-Null Distribution of the Product Moment Correlation Coefficient I: the Phi Coefficient
DOCUMENT RESUME ED 330 706 TM 016 274 AUTHOR Edwards, Lynne K.; Meyers, Sarah A. TITLE Robust Approximations to the Non-Null Distribution of the Product Moment Correlation Coefficient I: The Phi Coefficient. SPONS AGENCY Minnesota Supercomputer Inst. PUB DATE Apr 91 NOTE 18p.; Paper presented at the Annual Meeting of the American Educational Research Association (Chicago, IL, April 3-7, 1991). PUB TYPE Reports - Evaluative/Feasibility (142) -- Speeches/Conference Papers (150) EDRS PRICE MF01/PC01 Plus Postage. DESCRI2TORS *Computer Simulation; *Correlation; Educational Research; *Equations (Mathematics); Estimation (Mathematics); *Mathematical Models; Psychological Studies; *Robustness (Statistics) IDENTIFIERS *Apprv.amation (Statistics); Nonnull Hypothesis; *Phi Coefficient; Product Moment Correlation Coefficient ABSTRACT Correlation coefficients are frequently reported in educational and psychological research. The robustnessproperties and optimality among practical approximations when phi does not equal0 with moderate sample sizes are not well documented. Threemajor approximations and their variations are examined: (1) a normal approximation of Fisher's 2, N(sub 1)(R. A. Fisher, 1915); (2)a student's t based approximation, t(sub 1)(H. C. Kraemer, 1973; A. Samiuddin, 1970), which replaces for each sample size thepopulation phi with phi*, the median of the distribution ofr (the product moment correlation); (3) a normal approximation, N(sub6) (H.C. Kraemer, 1980) that incorporates the kurtosis of the Xdistribution; and (4) five variations--t(sub2), t(sub 1)', N(sub 3), N(sub4),and N(sub4)'--on the aforementioned approximations. N(sub 1)was fcund to be most appropriate, although N(sub 6) always producedthe shortest confidence intervals for a non-null hypothesis. All eight approximations resulted in positively biased rejection ratesfor large absolute values of phi; however, for some conditionswith low values of phi with heteroscedasticity andnon-zero kurtosis, they resulted in the negatively biased empirical rejectionrates. -
Testing Statistical Assumptions in Research Dedicated to My Wife Haripriya Children Prachi-Ashish and Priyam, –J.P.Verma
Testing Statistical Assumptions in Research Dedicated to My wife Haripriya children Prachi-Ashish and Priyam, –J.P.Verma My wife, sweet children, parents, all my family and colleagues. – Abdel-Salam G. Abdel-Salam Testing Statistical Assumptions in Research J. P. Verma Lakshmibai National Institute of Physical Education Gwalior, India Abdel-Salam G. Abdel-Salam Qatar University Doha, Qatar This edition first published 2019 © 2019 John Wiley & Sons, Inc. IBM, the IBM logo, ibm.com, and SPSS are trademarks or registered trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at “IBM Copyright and trademark information” at www.ibm.com/legal/ copytrade.shtml All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by law.Advice on how to obtain permision to reuse material from this title is available at http://www.wiley.com/go/permissions. The right of J. P. Verma and Abdel-Salam G. Abdel-Salam to be identified as the authors of this work has been asserted in accordance with law. Registered Offices John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, USA Editorial Office 111 River Street, Hoboken, NJ 07030, USA For details of our global editorial offices, customer services, and more information about Wiley products visit us at www.wiley.com. Wiley also publishes its books in a variety of electronic formats and by print-on-demand. -
On the Fallacy of the Effect Size Based on Correlation and Misconception of Contingency Tables
Revisiting Statistics and Evidence-Based Medicine: On the Fallacy of the Effect Size Based on Correlation and Misconception of Contingency Tables Sergey Roussakow, MD, PhD (0000-0002-2548-895X) 85 Great Portland Street London, W1W 7LT, United Kingdome [email protected] +44 20 3885 0302 Affiliation: Galenic Researches International LLP 85 Great Portland Street London, W1W 7LT, United Kingdome Word count: 3,190. ABSTRACT Evidence-based medicine (EBM) is in crisis, in part due to bad methods, which are understood as misuse of statistics that is considered correct in itself. This article exposes two related common misconceptions in statistics, the effect size (ES) based on correlation (CBES) and a misconception of contingency tables (MCT). CBES is a fallacy based on misunderstanding of correlation and ES and confusion with 2 × 2 tables, which makes no distinction between gross crosstabs (GCTs) and contingency tables (CTs). This leads to misapplication of Pearson’s Phi, designed for CTs, to GCTs and confusion of the resulting gross Pearson Phi, or mean-square effect half-size, with the implied Pearson mean square contingency coefficient. Generalizing this binary fallacy to continuous data and the correlation in general (Pearson’s r) resulted in flawed equations directly expressing ES in terms of the correlation coefficient, which is impossible without including covariance, so these equations and the whole CBES concept are fundamentally wrong. MCT is a series of related misconceptions due to confusion with 2 × 2 tables and misapplication of related statistics. The misconceptions are threatening because most of the findings from contingency tables, including CBES-based meta-analyses, can be misleading.