Docsity

Data Preprocessing for ML: Concepts, Attributes, Instances, and Mining, Slides of Computer Fundamentals

Partial preview of the text

Download Data Preprocessing for ML: Concepts, Attributes, Instances, and Mining and more Slides Computer Fundamentals in PDF only on Docsity!

Input:

Concepts, Attributes,

Instances

Docsity.com

Module Outline

  • Terminology
  • What’s a concept?
    • Classification, association, clustering, numeric prediction
  • What’s in an example?
    • Relations, flat files, recursion
  • What’s in an attribute?
    • Nominal, ordinal, interval, ratio
  • Preparing the input
    • ARFF, attributes, missing values, getting to know data

2

What’s a concept?

  • Data Mining Tasks (Styles of learning):
    • Classification learning:

predicting a discrete class

  • Association learning:

detecting associations between features

  • Clustering:

grouping similar instances into clusters

  • Numeric prediction:

predicting a numeric quantity

  • Concept: thing to be learned
  • Concept description: output of learning scheme

4

Classification learning

  • Example problems: attrition prediction, using DNA data for

diagnosis, weather data to predict play/not play

  • Classification learning is supervised
    • Scheme is being provided with actual outcome
  • Outcome is called the class of the example
  • Success can be measured on fresh data for which class labels

are known ( test data)

  • In practice success is often measured subjectively

5 Docsity.com

Clustering

  • Examples: customer grouping
  • Finding groups of items that are similar
  • Clustering is unsupervised
    • The class of an example is not known
  • Success often measured subjectively

7

Sepal length Sepal width Petal length Petal width Type 1 5.1 3.5 1.4 0.2 Iris setosa 2 4.9 3.0 1.4 0.2 Iris setosa … 51 7.0 3.2 4.7 1.4 Iris versicolor 52 6.4 3.2 4.5 1.5 Iris versicolor … 101 6.3 3.3 6.0 2.5 Iris virginica 102 5.8 2.7 5.1 1.9 Iris virginica …

Numeric prediction

  • Classification learning, but “class” is numeric
  • Learning is supervised
    • Scheme is being provided with target value
  • Measure success on test data

8

Outlook Temperature Humidity Windy Play-time Sunny Hot High False 5 Sunny Hot High True 0 Overcast Hot High False 55 Rainy Mild Normal False 40 … … … … …

A family tree

Peter

M

10

Peggy

F

Steven

M

Graham

M

Pam

F

Grace

F

Ray

M

Ian

M

Pippa

F

Brian

M

Anna

F

Nikki

F

Family tree represented as a table

11

Name Gender Parent1 parent Peter Male?? Peggy Female?? Steven Male Peter Peggy Graham Male Peter Peggy Pam Female Peter Peggy Ian Male Grace Ray Pippa Female Grace Ray Brian Male Grace Ray Anna Female Pam Ian Nikki Female Pam Ian

A full representation in one table

13

First person Second person Sister of? Name Gender Parent1 Parent2 Name Gender Parent1 Parent Steven Male Peter Peggy Pam Female Peter Peggy Yes Graham Male Peter Peggy Pam Female Peter Peggy Yes Ian Male Grace Ray Pippa Female Grace Ray Yes Brian Male Grace Ray Pippa Female Grace Ray Yes Anna Female Pam Ian Nikki Female Pam Ian Yes Nikki Female Pam Ian Anna Female Pam Ian Yes All the rest No

If second person’s gender = female

and first person’s parent = second person’s parent

then sister-of = yes

Generating a flat file

  • Process of flattening a file is called “denormalization”
    • Several relations are joined together to make one
  • Possible with any finite set of finite relations
  • Problematic: relationships without pre-specified number

of objects

  • Example: concept of nuclear-family
  • Denormalization may produce spurious regularities that

reflect structure of database

  • Example: “supplier” predicts “supplier address”

14

Nominal quantities

  • Values are distinct symbols
    • Values themselves serve only as labels or names
    • Nominal comes from the Latin word for name
  • Example: attribute “outlook” from weather data
    • Values: “sunny”,”overcast”, and “rainy”
  • No relation is implied among nominal values (no ordering or

distance measure)

  • Only equality tests can be performed

19

Ordinal quantities

  • Impose order on values
  • But: no distance between values defined
  • Example:

attribute “temperature” in weather data

  • Values: “hot” > “mild” > “cool”
  • Note: addition and subtraction don’t make sense
  • Example rule:

temperature < hot  play = yes

  • Distinction between nominal and ordinal not always

clear (e.g. attribute “outlook”)

20

Ratio quantities

  • Ratio quantities are ones for which the measurement

scheme defines a zero point

  • Example: attribute “distance”
    • Distance between an object and itself is zero
  • Ratio quantities are treated as real numbers
    • All mathematical operations are allowed
  • But: is there an “inherently” defined zero point?
    • Answer depends on scientific knowledge (e.g. Fahrenheit knew

no lower limit to temperature)

22

Attribute types used in practice

  • Most schemes accommodate just two levels of

measurement: nominal and ordinal

  • Nominal attributes are also called “categorical”,

”enumerated”, or “discrete”

  • But: “enumerated” and “discrete” imply order
  • Special case: dichotomy (“boolean” attribute)
  • Ordinal attributes are called “numeric”, or “continuous”
  • But: “continuous” implies mathematical continuity

23