Docsity

Evaluation and Credibility - Minning Data - Lecture Slides, Slides of Computer Fundamentals

Partial preview of the text

Download Evaluation and Credibility - Minning Data - Lecture Slides and more Slides Computer Fundamentals in PDF only on Docsity!

Evaluation and Credibility

How much should we

believe in what was

learned?

Outline

  • Introduction
  • Classification with Train, Test, and Validation sets - Handling Unbalanced Data; Parameter Tuning
  • Cross-validation
  • Comparing Data Mining Schemes

Evaluation issues

  • Possible evaluation measures:
    • Classification Accuracy
    • Total cost/benefit – when different errors involve different costs
    • Lift and ROC curves
    • Error in numeric predictions
  • How reliable are the predicted results?

Classifier error rate

  • Natural performance measure for classification problems: error rate - Success : instance’s class is predicted correctly - Error : instance’s class is predicted incorrectly - Error rate: proportion of errors made over the whole set of instances
  • Training set error rate: is way too optimistic!
    • you can find patterns even in random data

Evaluation on “LARGE” data, 2

  • A simple evaluation is sufficient
    • Randomly split data into training and test sets (usually 2/3 for train, 1/3 for test)
  • Build a classifier using the train set and evaluate it using the test set.

Classification Step 1: Split data into train and test sets

8

Results Known + +

- - +

THE PAST

Data

Training set

Testing set

Classification Step 3:

Evaluate on test set (Re-train?)

10

Data

Predictions Y (^) N

Results Known Training set

Testing set

+ +

- - + Model Builder Evaluate **+

-**

Unbalanced data

  • Sometimes, classes have very unequal frequency
    • Attrition prediction: 97% stay, 3% attrite (in a month)
    • medical diagnosis: 90% healthy, 10% disease
    • eCommerce: 99% don’t buy, 1% buy
    • Security: >99.99% of Americans are not terrorists
  • Similar situation with multiple classes
  • Majority class classifier can be 97% correct, but useless

Balancing unbalanced data, 1

  • With two classes, a good approach is to build BALANCED train and test sets, and train model on a balanced set - randomly select desired number of minority class instances - add equal number of randomly selected majority class
  • How do we generalize “balancing” to multiple classes?

Balancing unbalanced data, 2

  • Generalize “balancing” to multiple classes
    • Ensure that each class is represented with approximately equal proportions in train and test

Making the most of the data

  • Once evaluation is complete, all the data can be used to build the final classifier
  • Generally, the larger the training data the better the classifier (but returns diminish)
  • The larger the test data the more accurate the error estimate

witten & eibe Docsity.com^16

Classification:

Train, Validation, Test split

17

Data Predictions

Y (^) N

Results Known Training set

Validation set

+ +

- - + Model Builder

Evaluate

+

**-

-**

Final Test Set Final Model

+

**-

-**

Final Evaluation

Model Builder

*Confidence intervals

  • We can say: p lies within a certain specified interval with a certain specified confidence
  • Example: S =750 successes in N =1000 trials
    • Estimated success rate: 75%
    • How close is this to true success rate p?
      • Answer: with 80% confidence p ∈[73.2,76.7]
  • Another example: S =75 and N =
    • Estimated success rate: 75%
    • With 80% confidence p ∈[69.1,80.1]

witten & eibe Docsity.com^19

*Mean and variance (also Mod 7)

  • Mean and variance for a Bernoulli trial: p, p (1– p )
  • Expected success rate f=S / N
  • Mean and variance for f : p, p (1– p )/ N
  • For large enough N , f follows a Normal distribution
  • c% confidence interval [– z ≤ X ≤ z ] for random variable with 0 mean is given by:
  • With a symmetric distribution:

20

Pr[− z ≤ X ≤ z ] = c

Pr[ − z ≤ X ≤ z ]= 1 − 2 ×Pr[ X ≥ z ] witten & eibe Docsity.com