Docsity

Understanding Data Mining: Supervised & Unsupervised Learning - Classifying & Predicting, Summaries of Mathematics

Partial preview of the text

Download Understanding Data Mining: Supervised & Unsupervised Learning - Classifying & Predicting and more Summaries Mathematics in PDF only on Docsity!

DATA MINING

CLASSIFICATION

AMEYAA BIWALKAR
  • (^) Classification
    • (^) predicts categorical class labels (discrete or nominal)
    • (^) classifies data (constructs a model) based on the training set and the

values (class labels) in a classifying attribute and uses it in classifying

new data

  • (^) Numeric Prediction
    • (^) models continuous-valued functions, i.e., predicts unknown or

missing values

  • (^) Typical applications
    • (^) Credit/loan approval:
    • (^) Medical diagnosis: if a tumor is cancerous or benign
    • (^) Fraud detection: if a transaction is fraudulent
    • (^) Web page categorization: which category it is

Prediction Problems: Classification vs.

Numeric Prediction

Classification—A Two-Step Process

  • (^) Model construction: describing a set of predetermined classes
    • (^) Each tuple/sample is assumed to belong to a predefined class, as determined by the

class label attribute

  • (^) The set of tuples used for model construction is training set
  • The model is represented as classification rules, decision trees, or mathematical

formulae

  • (^) Model usage: for classifying future or unknown objects
    • Estimate accuracy of the model
      • (^) The known label of test sample is compared with the classified result from the

model

  • (^) Accuracy rate is the percentage of test set samples that are correctly classified by

the model

  • Test set is independent of training set (otherwise overfitting)
  • (^) If the accuracy is acceptable, use the model to classify new data
  • (^) Note: If the test set is used to select models, it is called validation (test) set

Process (2): Using the Model in Prediction

Classifier

Testing

Data

Unseen Data

(Jeff, Professor, 4)

Tenured?

NAME RANK YEARS TENURED

Tom Assistant Prof 2 no

Merlisa Associate Prof 7 no

George Professor 5 yes

Joseph Assistant Prof 7 yes

Decision Tree Induction: An Example

age?

overcast

student? credit rating?

no yes

yes

yes

31..

no

excellent fair no yes

 Training data set: Buys_computer

 Resulting tree:

age income student credit_rating buys_computer

<=30 high no fair no

<=30 high no excellent no

31…40 high no fair yes

40 medium no fair yes

40 low yes fair yes

40 low yes excellent no

31…40 low yes excellent yes

<=30 medium no fair no

<=30 low yes fair yes

40 medium yes fair yes

<=30 medium yes excellent yes

31…40 medium no excellent yes

31…40 high yes fair yes

40 medium no excellent no

Brief Review of Entropy

m = 2

Attribute Selection Measure:

Information Gain (ID3/C4.5)

 Select the attribute with the highest information gain

 Let p i

be the probability that an arbitrary tuple in D belongs to class C i

estimated by |C i , D

|/|D|

 Expected information (entropy) needed to classify a tuple in D:

 Information needed (after using A to split D into v partitions) to classify

D:

 Information gained by branching on attribute A

( ) log ( ) 2

1

i

m

i

i

Info D p p

1

j

v

j

j

A

Info D

D

D

Info D  

Gain(A) Info(D) Info (D) A

 