Algorithm Independent Topics Lecture 6

Similar documents
2 CONTENTS. Bibliography Index... 70

Algorithm-Independent Learning Issues

Parametric Techniques

Parametric Techniques Lecture 3

Variance Reduction and Ensemble Methods

PDEEC Machine Learning 2016/17

Machine Learning for Signal Processing Bayes Classification and Regression

Bagging. Ryan Tibshirani Data Mining: / April Optional reading: ISL 8.2, ESL 8.7

Machine Learning Linear Classification. Prof. Matteo Matteucci

CS4495/6495 Introduction to Computer Vision. 8C-L3 Support Vector Machines

Machine Learning. Lecture 4: Regularization and Bayesian Statistics. Feng Li.

LECTURE NOTE #3 PROF. ALAN YUILLE

Understanding Generalization Error: Bounds and Decompositions

CMU-Q Lecture 24:

Machine Learning Ensemble Learning I Hamid R. Rabiee Jafar Muhammadi, Alireza Ghasemi Spring /

Introduction to Machine Learning. Lecture 2

Contents Lecture 4. Lecture 4 Linear Discriminant Analysis. Summary of Lecture 3 (II/II) Summary of Lecture 3 (I/II)

COS513: FOUNDATIONS OF PROBABILISTIC MODELS LECTURE 9: LINEAR REGRESSION

Introduction: MLE, MAP, Bayesian reasoning (28/8/13)

Performance Comparison of K-Means and Expectation Maximization with Gaussian Mixture Models for Clustering EE6540 Final Project

Machine Learning. Theory of Classification and Nonparametric Classifier. Lecture 2, January 16, What is theoretically the best classifier

Statistics - Lecture One. Outline. Charlotte Wickham 1. Basic ideas about estimation

MS&E 226: Small Data

COMS 4771 Introduction to Machine Learning. Nakul Verma

ECE521 week 3: 23/26 January 2017

Parametric Models. Dr. Shuang LIANG. School of Software Engineering TongJi University Fall, 2012

Bayesian decision theory Introduction to Pattern Recognition. Lectures 4 and 5: Bayesian decision theory

10-704: Information Processing and Learning Fall Lecture 24: Dec 7

Linear Classifiers: Expressiveness

Linear and Logistic Regression. Dr. Xiaowei Huang

Introduction to Machine Learning. Introduction to ML - TAU 2016/7 1

LECTURE 5 NOTES. n t. t Γ(a)Γ(b) pt+a 1 (1 p) n t+b 1. The marginal density of t is. Γ(t + a)γ(n t + b) Γ(n + a + b)

Minimum Error-Rate Discriminant

Machine Learning 2017

ECE531 Lecture 10b: Maximum Likelihood Estimation

Introduction to Bayesian Learning. Machine Learning Fall 2018

Regression Estimation - Least Squares and Maximum Likelihood. Dr. Frank Wood

PATTERN CLASSIFICATION

Lecture : Probabilistic Machine Learning

Bayesian Linear Regression [DRAFT - In Progress]

Regression #3: Properties of OLS Estimator

Midterm Review CS 6375: Machine Learning. Vibhav Gogate The University of Texas at Dallas

Bayesian Learning (II)

Deep Learning for Computer Vision

Learning features by contrasting natural images with noise

Classification Methods II: Linear and Quadratic Discrimminant Analysis

Linear Models in Machine Learning

Pattern Recognition. Parameter Estimation of Probability Density Functions

Bayesian Methods: Naïve Bayes

Qualifying Exam in Machine Learning

COS513 LECTURE 8 STATISTICAL CONCEPTS

INTRODUCTION TO PATTERN RECOGNITION

Classifier Performance. Assessment and Improvement

Classification 2: Linear discriminant analysis (continued); logistic regression

CS229 Supplemental Lecture notes

CMSC858P Supervised Learning Methods

Ensemble Methods and Random Forests

Introduction and Models

p(d θ ) l(θ ) 1.2 x x x

Advanced Signal Processing Introduction to Estimation Theory

COS 424: Interacting with Data. Lecturer: Rob Schapire Lecture #15 Scribe: Haipeng Zheng April 5, 2007

Statistics: Learning models from data

6 The normal distribution, the central limit theorem and random samples

Machine learning comes from Bayesian decision theory in statistics. There we want to minimize the expected value of the loss function.

Part 4: Multi-parameter and normal models

Machine Learning CSE546 Carlos Guestrin University of Washington. September 30, 2013

CSE 546 Final Exam, Autumn 2013

ECE 5424: Introduction to Machine Learning

Kernel Methods and Support Vector Machines

Machine Learning. Ensemble Methods. Manfred Huber

6.867 Machine Learning

Introduction to Machine Learning Spring 2018 Note 18

Question of the Day? Machine Learning 2D1431. Training Examples for Concept Enjoy Sport. Outline. Lecture 3: Concept Learning

Lecture 7 Introduction to Statistical Decision Theory

On Bias, Variance, 0/1-Loss, and the Curse-of-Dimensionality. Weiqiang Dong

Linear Models for Regression CS534

Space Telescope Science Institute statistics mini-course. October Inference I: Estimation, Confidence Intervals, and Tests of Hypotheses

CSE 417T: Introduction to Machine Learning. Final Review. Henry Chai 12/4/18

Announcements. Proposals graded

Evaluation. Andrea Passerini Machine Learning. Evaluation

Lecture 2: Statistical Decision Theory (Part I)

Outline: Ensemble Learning. Ensemble Learning. The Wisdom of Crowds. The Wisdom of Crowds - Really? Crowd wiser than any individual

Machine Learning, Midterm Exam: Spring 2008 SOLUTIONS. Q Topic Max. Score Score. 1 Short answer questions 20.

Lecture 3: More on regularization. Bayesian vs maximum likelihood learning

6.867 Machine Learning

Lecture 4: Types of errors. Bayesian regression models. Logistic regression

Evaluation requires to define performance measures to be optimized

Introduction to Machine Learning Midterm Exam

DEPARTMENT OF COMPUTER SCIENCE Autumn Semester MACHINE LEARNING AND ADAPTIVE INTELLIGENCE

MS&E 226: Small Data. Lecture 6: Bias and variance (v2) Ramesh Johari

Machine Learning Lecture 7

Final Exam, Fall 2002

SYDE 372 Introduction to Pattern Recognition. Probability Measures for Classification: Part I

CS 231A Section 1: Linear Algebra & Probability Review

CSCI-567: Machine Learning (Spring 2019)

Nonparametric Methods Lecture 5

Chapter 7: Model Assessment and Selection

A General Overview of Parametric Estimation and Inference Techniques.

Lecture 3: Empirical Risk Minimization

CS7267 MACHINE LEARNING

Transcription:

Algorithm Independent Topics Lecture 6 Jason Corso SUNY at Buffalo Feb. 23 2009 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 1 / 45

Introduction Now that we ve built an intuition for some pattern classifiers, let s take a step back and look at some of the more foundational underpinnings. Algorithm-Independent means those mathematical foundations that do not depend upon the particular classifier or learning algorithm used; techniques that can be used in conjunction with different learning algorithms, or provide guidance in their use. Specifically, we will cover 1 Lack of inherent superiority of any one particular classifier; 2 Some systematic ways for selecting a particular method over another for a given scenario; 3 Methods for integrating component classifiers, including bagging, and (in depth) boosting. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 2 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem The key question we inspect: If we are interested solely in the generalization performance, are there any reasons to prefer one classifier or learning algorithm over another? J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 3 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem The key question we inspect: If we are interested solely in the generalization performance, are there any reasons to prefer one classifier or learning algorithm over another? Simply put, No! J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 3 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem The key question we inspect: If we are interested solely in the generalization performance, are there any reasons to prefer one classifier or learning algorithm over another? Simply put, No! If we find one particular algorithm outperforming another in a particular situation, it is a consequence of its fit to the particular pattern recognition problem, not the general superiority of the algorithm. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 3 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem The key question we inspect: If we are interested solely in the generalization performance, are there any reasons to prefer one classifier or learning algorithm over another? Simply put, No! If we find one particular algorithm outperforming another in a particular situation, it is a consequence of its fit to the particular pattern recognition problem, not the general superiority of the algorithm. NFLT should remind you that we need to focus on the particular problem at hand, the assumptions, the priors, the data and the cost. Recall the fish problem from earlier in the semester. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 3 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem The key question we inspect: If we are interested solely in the generalization performance, are there any reasons to prefer one classifier or learning algorithm over another? Simply put, No! If we find one particular algorithm outperforming another in a particular situation, it is a consequence of its fit to the particular pattern recognition problem, not the general superiority of the algorithm. NFLT should remind you that we need to focus on the particular problem at hand, the assumptions, the priors, the data and the cost. Recall the fish problem from earlier in the semester. For more information, refer to http://www.no-free-lunch.org/. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 3 / 45

Lack of Inherent Superiority Judging Classifier Performance No Free Lunch Theorem We need to be more clear about how we judge classifier performance. We ve thus far considered the performance on an i.i.d. test data set. But, this has drawbacks in some cases: J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 4 / 45

Lack of Inherent Superiority Judging Classifier Performance No Free Lunch Theorem We need to be more clear about how we judge classifier performance. We ve thus far considered the performance on an i.i.d. test data set. But, this has drawbacks in some cases: 1 In discrete situations with large training and testing sets, they necessarily overlap. We are hence testing on training patterns. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 4 / 45

Lack of Inherent Superiority Judging Classifier Performance No Free Lunch Theorem We need to be more clear about how we judge classifier performance. We ve thus far considered the performance on an i.i.d. test data set. But, this has drawbacks in some cases: 1 In discrete situations with large training and testing sets, they necessarily overlap. We are hence testing on training patterns. 2 In these cases, most sufficiently powerful techniques (e.g., nearest neighbor methods) can perfectly learn the training set. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 4 / 45

Lack of Inherent Superiority Judging Classifier Performance No Free Lunch Theorem We need to be more clear about how we judge classifier performance. We ve thus far considered the performance on an i.i.d. test data set. But, this has drawbacks in some cases: 1 In discrete situations with large training and testing sets, they necessarily overlap. We are hence testing on training patterns. 2 In these cases, most sufficiently powerful techniques (e.g., nearest neighbor methods) can perfectly learn the training set. 3 For low-noise or low-bayes error cases, if we use an algorithm powerful enough to learn the training set, then the upper limit of the i.i.d. error decreases as the training set size increases. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 4 / 45

Lack of Inherent Superiority Judging Classifier Performance No Free Lunch Theorem We need to be more clear about how we judge classifier performance. We ve thus far considered the performance on an i.i.d. test data set. But, this has drawbacks in some cases: 1 In discrete situations with large training and testing sets, they necessarily overlap. We are hence testing on training patterns. 2 In these cases, most sufficiently powerful techniques (e.g., nearest neighbor methods) can perfectly learn the training set. 3 For low-noise or low-bayes error cases, if we use an algorithm powerful enough to learn the training set, then the upper limit of the i.i.d. error decreases as the training set size increases. Thus, we will use the off-training set error, which is the error on points not in the training set. If the training set is very large, then the maximum size of the off-training set is necessarily small. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 4 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. We have a training set D consisting of pairs (x i, y i ) with x i being the patterns and y i = ±1 being the classes for i = 1,..., n. Assume the data is discrete. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. We have a training set D consisting of pairs (x i, y i ) with x i being the patterns and y i = ±1 being the classes for i = 1,..., n. Assume the data is discrete. We assume our data has been generated by some unknown target function F (x) which we want to learn (i.e., y i = F (x i )). Typically, we have some random component in the data giving a non-zero Bayes error rate. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. We have a training set D consisting of pairs (x i, y i ) with x i being the patterns and y i = ±1 being the classes for i = 1,..., n. Assume the data is discrete. We assume our data has been generated by some unknown target function F (x) which we want to learn (i.e., y i = F (x i )). Typically, we have some random component in the data giving a non-zero Bayes error rate. Let H denote the finite set of hypotheses or possible sets of parameters to be learned. Each element in the set, h H, comprises the necessary set of arguments to fully specify a classifier (e.g., parameters of a Gaussian). J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. We have a training set D consisting of pairs (x i, y i ) with x i being the patterns and y i = ±1 being the classes for i = 1,..., n. Assume the data is discrete. We assume our data has been generated by some unknown target function F (x) which we want to learn (i.e., y i = F (x i )). Typically, we have some random component in the data giving a non-zero Bayes error rate. Let H denote the finite set of hypotheses or possible sets of parameters to be learned. Each element in the set, h H, comprises the necessary set of arguments to fully specify a classifier (e.g., parameters of a Gaussian). P (h) is the prior that the algorithm will learn hypothesis h. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem We need to tie things down with concrete notation. Consider a two-class problem. We have a training set D consisting of pairs (x i, y i ) with x i being the patterns and y i = ±1 being the classes for i = 1,..., n. Assume the data is discrete. We assume our data has been generated by some unknown target function F (x) which we want to learn (i.e., y i = F (x i )). Typically, we have some random component in the data giving a non-zero Bayes error rate. Let H denote the finite set of hypotheses or possible sets of parameters to be learned. Each element in the set, h H, comprises the necessary set of arguments to fully specify a classifier (e.g., parameters of a Gaussian). P (h) is the prior that the algorithm will learn hypothesis h. P (h D) is the probability that the algorithm will yield hypothesis h when trained on the data D. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 5 / 45

Lack of Inherent Superiority No Free Lunch Theorem Let E be the error for our cost function (zero-one or for some general loss function). J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 6 / 45

Lack of Inherent Superiority No Free Lunch Theorem Let E be the error for our cost function (zero-one or for some general loss function). We cannot compute the error directly (i.e., based on distance of h to the unknown target function F ). J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 6 / 45

Lack of Inherent Superiority No Free Lunch Theorem Let E be the error for our cost function (zero-one or for some general loss function). We cannot compute the error directly (i.e., based on distance of h to the unknown target function F ). So, what we can do is compute the expected value of the error given our dataset, which will require us to marginalize over all possible targets. E[E D] = P (x) [1 δ(f (x), h(x))] P (h D)P (F D) (1) h,f x/ D We can view this as a weighted inner product between the distributions P (h D) and P (F D). It says that the expected error is related to 1 all possible inputs and their respective weights P (x); 2 the match between the hypothesis h and the target F. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 6 / 45

Lack of Inherent Superiority No Free Lunch Theorem Cannot Prove Much About Generalization The key point here, however, is that without prior knowledge of the target distribution P (F D), we can prove little about any paricular learning algorithm P (h D), including its generalization performance. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 7 / 45

Lack of Inherent Superiority No Free Lunch Theorem Cannot Prove Much About Generalization The key point here, however, is that without prior knowledge of the target distribution P (F D), we can prove little about any paricular learning algorithm P (h D), including its generalization performance. The expected off-training set error when the true function is F (x) and the probability for the kth candidate learning algorithm is P k (h(x) D) follows: E k [E F, n] = x/ D P (x) [1 δ(f (x), h(x))] P k (h(x) D) (2) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 7 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem For any two learning algorithms P 1 (h D) and P 2 (h D), the following are true, independent of the sampling distribution P (x) and the number n of training points: 1 Uniformly averaged over all target functions F, E 1 [E F, n] E 2 [E F, n] = 0. (3) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 8 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem For any two learning algorithms P 1 (h D) and P 2 (h D), the following are true, independent of the sampling distribution P (x) and the number n of training points: 1 Uniformly averaged over all target functions F, E 1 [E F, n] E 2 [E F, n] = 0. (3) No matter how clever we are at choosing a good learning algorithm P 1 (h D) and a bad algorithm P 2 (h D), if all target functions are equally likely, then the good algorithm will not outperform the bad one. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 8 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem For any two learning algorithms P 1 (h D) and P 2 (h D), the following are true, independent of the sampling distribution P (x) and the number n of training points: 1 Uniformly averaged over all target functions F, E 1 [E F, n] E 2 [E F, n] = 0. (3) No matter how clever we are at choosing a good learning algorithm P 1 (h D) and a bad algorithm P 2 (h D), if all target functions are equally likely, then the good algorithm will not outperform the bad one. There are no i and j such that for all F (x), E i [E F, n] > E j [E F, n]. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 8 / 45

Lack of Inherent Superiority No Free Lunch Theorem No Free Lunch Theorem For any two learning algorithms P 1 (h D) and P 2 (h D), the following are true, independent of the sampling distribution P (x) and the number n of training points: 1 Uniformly averaged over all target functions F, E 1 [E F, n] E 2 [E F, n] = 0. (3) No matter how clever we are at choosing a good learning algorithm P 1 (h D) and a bad algorithm P 2 (h D), if all target functions are equally likely, then the good algorithm will not outperform the bad one. There are no i and j such that for all F (x), E i [E F, n] > E j [E F, n]. Furthermore, there is at least one target function for which random guessing is a better algorithm! J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 8 / 45

Lack of Inherent Superiority No Free Lunch Theorem 1 For any fixed training set D, uniformly averaged over F, E 1 [E F, D] E 2 [E F, D] = 0. (4) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 9 / 45

Lack of Inherent Superiority No Free Lunch Theorem 1 For any fixed training set D, uniformly averaged over F, E 1 [E F, D] E 2 [E F, D] = 0. (4) 2 Uniformly averaged over all priors P (F ), E 1 [E n] E 2 [E n] = 0. (5) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 9 / 45

Lack of Inherent Superiority No Free Lunch Theorem 1 For any fixed training set D, uniformly averaged over F, E 1 [E F, D] E 2 [E F, D] = 0. (4) 2 Uniformly averaged over all priors P (F ), E 1 [E n] E 2 [E n] = 0. (5) 3 For any fixed training set D, uniformly averaged over P (F ), E 1 [E D] E 2 [E D] = 0. (6) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 9 / 45

An NFLT Example Lack of Inherent Superiority No Free Lunch Theorem x F h 1 h 2 000 1 1 1 D 001-1 -1-1 010 1 1 1 011-1 1-1 100 1 1-1 101-1 1-1 110 1 1-1 111 1 1-1 Given 3 binary features. Expected off-training set errors are E 1 = 0.4 and E 2 = 0.6. The fact that we do not know F (x) beforehand means that all targets are equally likely and we therefore must average over all possible ones. For each of the consistent 2 5 distinct target functions, there is exactly one other target function whose output is inverted for each of the patterns outside of the training set. Thus, they re behaviors are inverted and cancel. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 10 / 45

Lack of Inherent Superiority No Free Lunch Theorem Illustration of Part 1: A Conversation Generalization possible learning systems a) b) c) - - - + - + + - - + 0 - + - - 0 - - - 0 - - - - - + 0 0 d) e) f) + + 0 + + 0 0 0 0 0 impossible 0 0 0 learning systems + 0 + 0 0 0 0 0 0 - + 0 0 problem space (not feature space) FIGURE 9.1. The No Free Lunch Theorem shows the generalization performance on the off-training There isset a conservation data that can beidea achieved one (top canrow) takeand from alsothis: showsfor the every performance that cannot be achieved (bottom row). Each square represents all possible classification possible learning algorithm for binary classification the sum of problems consistent with the training data this is not the familiar feature space. A + indicates performance that the classification over all possible algorithmtarget has generalization functions ishigher exactly thanzero. average, a indicates lower than average, and a 0 indicates average performance. The size of a J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 11 / 45

Lack of Inherent Superiority NFLT Take Home Message No Free Lunch Theorem It is the assumptions about the learning algorithm and the particular pattern recognition scenario that are relevant. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 12 / 45

Lack of Inherent Superiority NFLT Take Home Message No Free Lunch Theorem It is the assumptions about the learning algorithm and the particular pattern recognition scenario that are relevant. This is a particularly important issue in practical pattern recognition scenarios when even strongly theoretically grounded methods mah behave poorly. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 12 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Now, we turn our attention to a related question: is there any one feature or pattern representation that will yield better classification performance in the absence of assumptions? No! you guessed it! J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 13 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Now, we turn our attention to a related question: is there any one feature or pattern representation that will yield better classification performance in the absence of assumptions? No! you guessed it! The ugly duckling theorem states that in the absence of assumptions, there is no privileged or best feature. Indeed, even the way we compute similarity between patterns depends implicitly on the assumptions. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 13 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Now, we turn our attention to a related question: is there any one feature or pattern representation that will yield better classification performance in the absence of assumptions? No! you guessed it! The ugly duckling theorem states that in the absence of assumptions, there is no privileged or best feature. Indeed, even the way we compute similarity between patterns depends implicitly on the assumptions. And, of course, these assumptions may or may not be correct... J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 13 / 45

Lack of Inherent Superiority Feature Representation Ugly Duckling Theorem We can use logical expressions or predicates to describe a pattern (we will get to this later in non-metric methods). Denote a binary feature attribute by f i, then a particular pattern might be described by the predicate f 1 f 2. We could also define such predicates on the data itself: x 1 x 2. Define the rank of a predicate to be the number of elements it contains. a) b) c) f 1 x 1 x 1 f 1 f 1 f 2 x 3 x 2 f 2 f 3 x 2 x 3 x 4 x 1 x 2 f 3 x 4 f 3 x 5 f 2 x 3 x 6 x5 x 4 FIGURE 9.2. Patterns x i, represented as d-tuples of binary features f i, can be placed in J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 14 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Impact of Prior Assumptions on Features In the absence of prior information, is there a principled reason to judge any two distinct patterns as more or less similar than two other distinct patterns? A natural measure of similarity is the number of features shared by the two patterns. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 15 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Impact of Prior Assumptions on Features In the absence of prior information, is there a principled reason to judge any two distinct patterns as more or less similar than two other distinct patterns? A natural measure of similarity is the number of features shared by the two patterns. Can you think of any issues with such a similarity measure? J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 15 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Impact of Prior Assumptions on Features In the absence of prior information, is there a principled reason to judge any two distinct patterns as more or less similar than two other distinct patterns? A natural measure of similarity is the number of features shared by the two patterns. Can you think of any issues with such a similarity measure? Suppose we have two features: f 1 represents blind in right eye, and f 2 represents blind in left eye. Say person x 1 = (1, 0) is blind in the right eye only and person x 2 = (0, 1) is blind only in the left eye. x 1 and x 2 are maximally different. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 15 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Impact of Prior Assumptions on Features In the absence of prior information, is there a principled reason to judge any two distinct patterns as more or less similar than two other distinct patterns? A natural measure of similarity is the number of features shared by the two patterns. Can you think of any issues with such a similarity measure? Suppose we have two features: f 1 represents blind in right eye, and f 2 represents blind in left eye. Say person x 1 = (1, 0) is blind in the right eye only and person x 2 = (0, 1) is blind only in the left eye. x 1 and x 2 are maximally different. This is conceptually a problem: person x 1 is more similar to a totally blind person and a normally sighted person than to person x 2. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 15 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Multiple Feature Representations One can always find multiple ways of representing the same features. For example, we might use f 1 and f 2 to represent blind in right eye and same in both eyes, resp. Then we would have the following four types of people (in both cases): f 1 f 2 f 1 f 2 x 1 0 0 0 1 x 2 0 1 0 0 x 3 1 0 1 0 x 4 1 1 1 1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 16 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. There are no predicates of rank 1 that are shared by the two patterns. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. There are no predicates of rank 1 that are shared by the two patterns. There is but one predicate of rank 2, x i x j. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. There are no predicates of rank 1 that are shared by the two patterns. There is but one predicate of rank 2, x i x j. For predicates of rank 3, two of the patterns must be x i and x j. So, with d patterns in total, there are ( ) d 2 1 = d 2. predicates of rank 3. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. There are no predicates of rank 1 that are shared by the two patterns. There is but one predicate of rank 2, x i x j. For predicates of rank 3, two of the patterns must be x i and x j. So, with d patterns in total, there are ( ) d 2 1 = d 2. predicates of rank 3. For arbitrary rank, the total number of predicates shared by the two patterns is d ( ) d 2 = (1 + 1) d 2 = 2 d 2 (7) r 2 r 2 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Back To Comparing Features/Patterns The plausible similarity measure is thus the number of predicates the two patterns share, rather than the number of shared features. Consider two distinct patterns in some representation x i and x j, i j. There are no predicates of rank 1 that are shared by the two patterns. There is but one predicate of rank 2, x i x j. For predicates of rank 3, two of the patterns must be x i and x j. So, with d patterns in total, there are ( ) d 2 1 = d 2. predicates of rank 3. For arbitrary rank, the total number of predicates shared by the two patterns is d ( ) d 2 = (1 + 1) d 2 = 2 d 2 (7) r 2 r 2 Key: This result is independent of the choice of x i and x j (as long as they are distinct). Thus, the total number of predicates shared by two distinct patterns is constant and independent of the patterns themselves. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 17 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Given that we use a finite set of predicates that enables us to distinguish any two patterns under consideration, the number of predicates shared by any two such patterns is constant and independent of the choice of those patterns. Furthermore, if pattern similarity is based on the total number of predicates shared by the two patterns, then any two patterns are equally similar. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 18 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Given that we use a finite set of predicates that enables us to distinguish any two patterns under consideration, the number of predicates shared by any two such patterns is constant and independent of the choice of those patterns. Furthermore, if pattern similarity is based on the total number of predicates shared by the two patterns, then any two patterns are equally similar. I.e., there is no problem-independent or privileged best set of features or feature attributes. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 18 / 45

Lack of Inherent Superiority Ugly Duckling Theorem Ugly Duckling Theorem Given that we use a finite set of predicates that enables us to distinguish any two patterns under consideration, the number of predicates shared by any two such patterns is constant and independent of the choice of those patterns. Furthermore, if pattern similarity is based on the total number of predicates shared by the two patterns, then any two patterns are equally similar. I.e., there is no problem-independent or privileged best set of features or feature attributes. The theorem forces us to acknowledge that even the apparently simply notion of similarity between patterns is fundamentally based on implicit assumptions about the problem domain. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 18 / 45

Bias and Variance Bias and Variance Introduction Bias and Variance are two measures of how well a learning algorithm matches a classification problem. Bias measures the accuracy or quality of the match: high bias is a poor match. Variance measures the precision or specificity of the match: a high variance implies a weak match. One can generally adjust the bias and the variance, but they are not independent. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 19 / 45

Bias and Variance Regression Bias and Variance in Terms of Regression Suppose there is a true but unknown function F (x) (having continuous valued output with noise). We seek to estimate F ( ) based on n samples in set D (assumed to have been generated by the true F (x)). The regression function estimated is denoted g(x; D). How does this approximation depend on D? J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 20 / 45

Bias and Variance Regression Bias and Variance in Terms of Regression Suppose there is a true but unknown function F (x) (having continuous valued output with noise). We seek to estimate F ( ) based on n samples in set D (assumed to have been generated by the true F (x)). The regression function estimated is denoted g(x; D). How does this approximation depend on D? The natural measure of effectiveness is the mean square error. And, note we need to average over all training sets D of fixed size n: [ E D (g(x; D) F (x)) 2 ] = (E D [g(x; D) F (x)]) 2 [ + E }{{} D (g(x; D) ED [g(x; D)]) 2] }{{} bias 2 variance (8) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 20 / 45

Bias and Variance Regression Bias is the difference between the expected value and the true (generally unknown) value). A low bias means that on average we will accurately estimate F from D. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 21 / 45

Bias and Variance Regression Bias is the difference between the expected value and the true (generally unknown) value). A low bias means that on average we will accurately estimate F from D. A low variance means that the estimate of F does not change much as the training set varies. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 21 / 45

Bias and Variance Regression Bias is the difference between the expected value and the true (generally unknown) value). A low bias means that on average we will accurately estimate F from D. A low variance means that the estimate of F does not change much as the training set varies. Note, that even if an estimator is unbiased, there can nevertheless be a large mean-square error arising from a large variance term. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 21 / 45

Bias and Variance Regression Bias is the difference between the expected value and the true (generally unknown) value). A low bias means that on average we will accurately estimate F from D. A low variance means that the estimate of F does not change much as the training set varies. Note, that even if an estimator is unbiased, there can nevertheless be a large mean-square error arising from a large variance term. The bias-variance dilemma describes the trade-off between the two terms above: procedures with increased flexibility to adapt to the training data tend to have lower bias but higher variance. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 21 / 45

Bias and Variance Regression y a) b) c) d) g(x) = fixed y g(x) = fixed g(x) = a 0 + a 1 x + a 0 x 2 +a 3 x 3 learned y y g(x) = a 0 + a 1 x learned D 1 g(x) F(x) g(x) F(x) g(x) F(x) g(x) F(x) x x x x y y y y D 2 g(x) F(x) g(x) F(x) g(x) F(x) g(x) F(x) x x x x y y y y D 3 g(x) F(x) g(x) F(x) g(x) F(x) F(x) g(x) x x x x p p p p bias bias bias bias E E E E variance variance variance variance J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 22 / 45

Bias and Variance Classification Bias-Variance for Classification How can we map the regression results to classification? For a two-category classification problem, we can define the target function as follows F (x) = P (y = 1 x) = 1 P (y = 0 x) (9) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 23 / 45

Bias and Variance Classification Bias-Variance for Classification How can we map the regression results to classification? For a two-category classification problem, we can define the target function as follows F (x) = P (y = 1 x) = 1 P (y = 0 x) (9) To recast classification in the framework of regression, define a discriminant function y = F (x) + ɛ (10) where ɛ is a zero-mean r.v. assumed to be binomial with variance F (x)(1 F (x)). J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 23 / 45

Bias and Variance Classification Bias-Variance for Classification How can we map the regression results to classification? For a two-category classification problem, we can define the target function as follows F (x) = P (y = 1 x) = 1 P (y = 0 x) (9) To recast classification in the framework of regression, define a discriminant function y = F (x) + ɛ (10) where ɛ is a zero-mean r.v. assumed to be binomial with variance F (x)(1 F (x)). The target function can thus be expressed as F (x) = E[y x] (11) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 23 / 45

Bias and Variance Classification We want to find an estimate g(x; D) that minimizes the mean-square error: E D [ (g(x; D) y) 2 ] (12) And thus the regression method ideas can translate here to classification. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 24 / 45

Bias and Variance Classification We want to find an estimate g(x; D) that minimizes the mean-square error: E D [ (g(x; D) y) 2 ] (12) And thus the regression method ideas can translate here to classification. Assume equal priors P (ω 1 ) = P (ω 1 ) = 1/2 giving a Bayesian discriminant y B with a threshold 1/2. The Bayesian decision boundary is the set of points for which F (x) = 1/2. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 24 / 45

Bias and Variance Classification We want to find an estimate g(x; D) that minimizes the mean-square error: E D [ (g(x; D) y) 2 ] (12) And thus the regression method ideas can translate here to classification. Assume equal priors P (ω 1 ) = P (ω 1 ) = 1/2 giving a Bayesian discriminant y B with a threshold 1/2. The Bayesian decision boundary is the set of points for which F (x) = 1/2. For a given training set D, we have the lowest error if the classifier error rate agrees with the Bayes error rate: P (g(x; D) y) = P (y B (x) y) = min[f (x), 1 F (x)] (13) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 24 / 45

Bias and Variance Classification If not, then we have some increase on the Bayes error P (g(x; D)) = max[f (x), 1 F (x)] (14) = 2F (x) 1 + P (y B (x) = y). (15) And averaging over all datasets of size n yields P (g(x; D) y) = 2F (x) 1 P (g(x; D) y B ) + P (y B y) (16) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 25 / 45

Bias and Variance Classification If not, then we have some increase on the Bayes error P (g(x; D)) = max[f (x), 1 F (x)] (14) And averaging over all datasets of size n yields = 2F (x) 1 + P (y B (x) = y). (15) P (g(x; D) y) = 2F (x) 1 P (g(x; D) y B ) + P (y B y) (16) Hence, the classification error rate is linearly proportional to the boundary error P (g(x; D) y b ), the incorrect estimation of the Bayes boundary, which is the opposite tail as we saw earlier in lecture 2. { 1/2 p(g(x; D))dg if F (x) < 1/2 P (g(x; D) y B ) = 1/2 p(g(x; D))dg if F (x) 1/2 (17) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 25 / 45

Bias and Variance Classification Bias-Variance Classification Boundary Error for Gaussian Case If we assume p(g(x; D)) is a Gaussian, we find P (g(x; D) y B ) = Φ Sgn[F (x) 1/2][E D [g(x; D)] 1/2] Var[g(x; D)] 1/2 (18) }{{}}{{} boundary bias variance where Φ(t) = 1 2π t exp [ 1/2u 2] du. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 26 / 45

Bias and Variance Classification Bias-Variance Classification Boundary Error for Gaussian Case If we assume p(g(x; D)) is a Gaussian, we find P (g(x; D) y B ) = Φ Sgn[F (x) 1/2][E D [g(x; D)] 1/2] Var[g(x; D)] 1/2 (18) }{{}}{{} boundary bias variance where Φ(t) = 1 2π t exp [ 1/2u 2] du. You can visualize the boundary bias by imaginging taking the spatial average of decision boundaries obtained by running the learning algorithm on all possible data sets. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 26 / 45

Bias and Variance Classification Bias-Variance Classification Boundary Error for Gaussian Case If we assume p(g(x; D)) is a Gaussian, we find P (g(x; D) y B ) = Φ Sgn[F (x) 1/2][E D [g(x; D)] 1/2] Var[g(x; D)] 1/2 (18) }{{}}{{} boundary bias variance where Φ(t) = 1 2π t exp [ 1/2u 2] du. You can visualize the boundary bias by imaginging taking the spatial average of decision boundaries obtained by running the learning algorithm on all possible data sets. Hence, the effect of the variance term on the boundary error is highly nonlinear and depends on the value of the boundary bias. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 26 / 45

Bias and Variance Classification With small variance, the sign of the boundary bias is increasingly a player. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 27 / 45

Bias and Variance Classification With small variance, the sign of the boundary bias is increasingly a player. Whereas in regression the estimation error is additive in bias and variance, in classification there is a non-linear and multiplicative interaction. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 27 / 45

Bias and Variance Classification With small variance, the sign of the boundary bias is increasingly a player. Whereas in regression the estimation error is additive in bias and variance, in classification there is a non-linear and multiplicative interaction. In classification, the sign of the bounary bias affects the role of the variance in the error. So, low variance is generally important for accurate classification, while low boundary bias need not be. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 27 / 45

Bias and Variance Classification With small variance, the sign of the boundary bias is increasingly a player. Whereas in regression the estimation error is additive in bias and variance, in classification there is a non-linear and multiplicative interaction. In classification, the sign of the bounary bias affects the role of the variance in the error. So, low variance is generally important for accurate classification, while low boundary bias need not be. Similarly, in classification, variance dominates bias. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 27 / 45

Bias and Variance Classification x2 x 1 x 1 x x 1 2 x 2 D 2 x2 truth x 1 x 2 x 1 x 2 x 1 truth a) b) c) a) b) c) low x 2 x 2 x 2 2 2 x 2 σ 1 0 Σ = i ( i1 σ i12 σ 2 ) Σ = i ( i1 0 ) 1 σ i1 0 2 2 Σ = i ( 0 1) 2 σ 1 0 Σ = i ( i1 σ i12 2 ) Σ = i ( ) Σ = i ( ) σ i21 σ i2 0 σ i2 σ i21 σ i2 0 1 Bias low high D 3 Bias 0 σ i2 x 2 x 2 x 2 x 2 x high 2 x 1 x 2 x 1 D 1 boundary distributions D 1 x2 x 1 x 2 x 1 x 2 x 1 x 1 x 1 p p p x 1 x2 x 1 x 2 error histograms x 1 x 2 x 1 D 2 E B E E B E E B E x2 D x 2 1 x 2 D 3 x x 1 x x 1 2 high Variance FIGURE 9.5. The (boundary) bias-variance trade-off in classification is illu x2 a two-dimensional x 1 x Gaussian x 1 x 1 2 xproblem. The figure at the top shows the true d 2 and the Bayes decision boundary. The nine figures in the middle show diffe J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 28 / 45 decision x boundaries. x Each row corresponds to a different training set of n low

Bias and Variance Resampling Statistics How Can We Determine the Bias and Variance? The results from the discussion in bias and variance suggest a way to estimate these two values (and hence a way to quantify the match between a method and a problem). What is it? J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 29 / 45

Bias and Variance Resampling Statistics How Can We Determine the Bias and Variance? The results from the discussion in bias and variance suggest a way to estimate these two values (and hence a way to quantify the match between a method and a problem). What is it? Resampling. I.e., taking multiple datasets, perform the estimation and evaluate the boundary distributions and error histograms. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 29 / 45

Bias and Variance Resampling Statistics How Can We Determine the Bias and Variance? The results from the discussion in bias and variance suggest a way to estimate these two values (and hence a way to quantify the match between a method and a problem). What is it? Resampling. I.e., taking multiple datasets, perform the estimation and evaluate the boundary distributions and error histograms. Let s make these ideas clear in presenting two methods for resampling: 1 Jackknife 2 Bootstrap J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 29 / 45

Jackknife Bias and Variance Resampling Statistics Let s first attempt to demonstrate how resampling can be used to yield a more informative estimate of a general statistic. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 30 / 45

Jackknife Bias and Variance Resampling Statistics Let s first attempt to demonstrate how resampling can be used to yield a more informative estimate of a general statistic. Suppose we have a set D of n points x i sampled from a one-dimensional distribution. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 30 / 45

Jackknife Bias and Variance Resampling Statistics Let s first attempt to demonstrate how resampling can be used to yield a more informative estimate of a general statistic. Suppose we have a set D of n points x i sampled from a one-dimensional distribution. The familiar estimate of the mean is ˆµ = 1 n n x i (19) i=1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 30 / 45

Jackknife Bias and Variance Resampling Statistics Let s first attempt to demonstrate how resampling can be used to yield a more informative estimate of a general statistic. Suppose we have a set D of n points x i sampled from a one-dimensional distribution. The familiar estimate of the mean is ˆµ = 1 n n x i (19) And, the estimate of the accuracy of the mean is the sample variance, given by ˆσ 2 = 1 n 1 i=1 n (x i ˆµ) 2 (20) i=1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 30 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). Of course, we can determine the median explicitly. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). Of course, we can determine the median explicitly. But, how can we compute the accuracy of the median, or a measure of the error or spread of it? This problem would translate to many other statistics that we could compute, such as the mode. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). Of course, we can determine the median explicitly. But, how can we compute the accuracy of the median, or a measure of the error or spread of it? This problem would translate to many other statistics that we could compute, such as the mode. Resampling will help us here. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). Of course, we can determine the median explicitly. But, how can we compute the accuracy of the median, or a measure of the error or spread of it? This problem would translate to many other statistics that we could compute, such as the mode. Resampling will help us here. First, define some new notation for leave-one-out statistic in which the statistic, such as the mean, is computed by leaving a particular datum out of the estimate. For the mean, we have µ (i) = 1 n 1 j i x j = nˆµ x i n 1. (21) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics Now, suppose we were instead interested in the median (the point for which half the distribution is higher, half lower). Of course, we can determine the median explicitly. But, how can we compute the accuracy of the median, or a measure of the error or spread of it? This problem would translate to many other statistics that we could compute, such as the mode. Resampling will help us here. First, define some new notation for leave-one-out statistic in which the statistic, such as the mean, is computed by leaving a particular datum out of the estimate. For the mean, we have µ (i) = 1 n 1 j i x j = nˆµ x i n 1. (21) Next, we can define the jackknife estimate of the mean, that is, the mean of the leave-one-out means: µ ( ) = 1 n µ n (i) (22) i=1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 31 / 45

Bias and Variance Resampling Statistics And, we can show that the jackknife mean is the same of the traditional mean. J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 32 / 45

Bias and Variance Resampling Statistics And, we can show that the jackknife mean is the same of the traditional mean. The variance of the jacknife estimate is given by Var[ˆµ] = n 1 n n (µ (i) µ ( ) ) 2 (23) which is equivalent to the traditional variance (for the mean case). i=1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 32 / 45

Bias and Variance Resampling Statistics And, we can show that the jackknife mean is the same of the traditional mean. The variance of the jacknife estimate is given by Var[ˆµ] = n 1 n n (µ (i) µ ( ) ) 2 (23) which is equivalent to the traditional variance (for the mean case). i=1 The benefit of expressing the variance of a jackknife estimate in this way is that it generalizes to any estimator ˆθ, such as the median. To do so, we would need to similarly compute the set of n leave-one-out statistics, θ (i). [ Var[ˆθ] = E [ˆθ(x 1, x 2,..., x n ) E[ˆθ]] 2] (24) Var jack [ˆθ] = n 1 n n (θ (i) θ ( ) ) 2 (25) i=1 J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 32 / 45

Bias and Variance Jackknife Bias Estimate Resampling Statistics The general bias of an estimator θ is the difference between its true value and its expected value: bias[ˆθ] = θ E[ˆθ] (26) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 33 / 45

Bias and Variance Jackknife Bias Estimate Resampling Statistics The general bias of an estimator θ is the difference between its true value and its expected value: bias[ˆθ] = θ E[ˆθ] (26) And, we can use the jackknife method to estimate such a bias. bias jack [ˆθ] = (n 1) (ˆθ( ) ˆθ ) (27) J. Corso (SUNY at Buffalo) Algorithm Independent Topics Lecture 6 Feb. 23 2009 33 / 45