Docsity

Data Mining: Model Evaluation and Classifier Metrics, Slides of Data Warehousing

Partial preview of the text

Download Data Mining: Model Evaluation and Classifier Metrics and more Slides Data Warehousing in PDF only on Docsity!

Data Mining Model

Evaluation

docsity.com

Model Evaluation and Selection  Evaluation metrics: How can we measure accuracy? Other metrics to consider?  Use test set of class

labeled tuples instead of training set when assessing accuracy  Methods for estimating a classifier’s accuracy:  Holdout method, random subsampling  Cross

validation  Bootstrap  Comparing classifiers:  Confidence intervals  Cost

benefit analysis and

ROC

Curves docsity.com

Classifier Evaluation Metrics: Confusion Matrix Actual class\Predicted class buy_computer = yes buy_computer = no Total buy_computer = yes 6954 46 7000 buy_computer = no 412 2588 3000 Total 7366 2634 10000  Given m classes, an entry,

CM

i,j in a confusion matrix indicates

of tuples in class i that were labeled by the classifier as class j  May have extra rows/columns to provide totals Confusion Matrix: Actual class\Predicted class C 1 ¬ C 1 C 1 True Positives (TP) False Negatives (FN) ¬ C 1 False Positives (FP) True Negatives (TN) Example of Confusion Matrix: docsity.com

Classifier Evaluation Metrics: Accuracy, Error Rate, Sensitivity and SpecificityClassifier Accuracy, or recognition rate: percentage of test set tuples that are correctly classified Accuracy

(TP

TN)/AllError rate:

- accuracy

or Error rate

(FP

FN)/AllClass Imbalance Problem

 One class may be rare

e.g. fraud, or

HIV

positive  Significant majority of the negative class and minority of the positive class  Sensitivity

True Positive recognition rate  Sensitivity

TP/P

Specificity

True Negative recognition rate  Specificity

TN/N

A\P C ¬C C TP FN P ¬C FP TN N P’ N’ All docsity.com

Classifier Evaluation Metrics: ExamplePrecision

Recall

Actual Class\Predicted class cancer = yes cancer = no Total Recognition(%) cancer = yes 90 210 300

( sensitivity cancer = no 140 9560 9700

( specificity) Total 230 9770 10000

( accuracy ) docsity.com

July 19, 2012 Data Mining: Concepts and Techniques Predictor/Estimation Error Measures  Measure predictor accuracy: measure how far off the predicted value is from the actual known value  Loss function : measures the error betw. y i^ and the predicted value y ’i^  Absolute error: | y i^

  • y ’|i^  Squared error: (y i^
    • y ’)i^ 2  Test error (generalization error): the average loss over the test set  Mean absolute error: Mean squared error:  Root Mean Square Error = The mean squared ‐ error exaggerates the presence of outliers Popularly use (square) root mean ‐ square error d y y d i i i

  1 |' | d y y d i i i

  1 2 )' ( MSE docsity.com

Unsupervised Model Evaluation (cluster quality)

All

clustering

techniques

compute

some

measure

of

cluster

quality.

One

evaluation

method

is

to

calculate

the

sum

of

squared

error

differences

between

the

instances

of

each

cluster

and

their

cluster

center.

Smaller

values

indicate

clusters

of

higher

quality.

docsity.com

Supervised Learning for Unsupervised Model Evaluation

Designate

each

formed

cluster

as

a

class

and

assign

each

class

an

arbitrary

name.

Choose

a

random

sample

of

instances

from

each

class

for

supervised

learning.

Build

a

supervised

model

from

the

chosen

instances.

Employ

the

remaining

instances

to

test

the

correctness

of

the

model.

docsity.com