data and representation

67
INTRODUCTION TO DATA

Upload: mohammed-ahmed-ali

Post on 11-Feb-2016

227 views

Category:

Documents


0 download

DESCRIPTION

Data representation

TRANSCRIPT

Page 1: Data and Representation

INTRODUCTION TO DATA

Page 2: Data and Representation

What is Data? Collection of data objects and

their attributes. An attribute is a property or

characteristic of an object– Examples: eye color of a person,

temperature, etc.

– Attribute is also known as variable, field, characteristic, or feature.

A collection of attributes describe an object– Object is also known as record,

point, case, sample, entity, or instance.

Tid Refund Marital Status

Taxable Income Cheat

1 Yes Single 125K No

2 No Married 100K No

3 No Single 70K No

4 Yes Married 120K No

5 No Divorced 95K Yes

6 No Married 60K No

7 Yes Divorced 220K No

8 No Single 85K Yes

9 No Married 75K No

10 No Single 90K Yes 10

Attributes

Objects

Page 3: Data and Representation

Types of data sets Record

– Data Matrix

– Document Data

– Transaction Data Graph

– World Wide Web

– Molecular Structures Ordered

– Spatial Data

– Temporal Data

– Sequential Data

– Genetic Sequence Data

Page 4: Data and Representation

Record Data

Data that consists of a collection of records, each of which consists

of a fixed set of attributes.

Tid Refund Marital Status

Taxable Income Cheat

1 Yes Single 125K No

2 No Married 100K No

3 No Single 70K No

4 Yes Married 120K No

5 No Divorced 95K Yes

6 No Married 60K No

7 Yes Divorced 220K No

8 No Single 85K Yes

9 No Married 75K No

10 No Single 90K Yes 10

Page 5: Data and Representation

Document Data Each document becomes a `term' vector,

– Each term is a component (attribute) of the vector,– The value of each component is the number of times the

corresponding term occurs in the document.

Document 1

season

timeout

lost

win

game

score

ball

play

coach

team

Document 2

Document 3

3 0 5 0 2 6 0 2 0 2

0

0

7 0 2 1 0 0 3 0 0

1 0 0 1 2 2 0 3 0

Page 6: Data and Representation

Transaction Data

A special type of record data, where – Each record (transaction) involves a set of items. – For example, consider a grocery store. The set of products purchased

by a customer during one shopping trip constitute a transaction, while the individual products that were purchased are the items.

TID Items

1 Bread, Coke, Milk

2 Beer, Bread

3 Beer, Coke, Diaper, Milk

4 Beer, Bread, Diaper, Milk

5 Coke, Diaper, Milk

Page 7: Data and Representation

Graph Data

• Generic graph and HTML Links

5

2

1 2

5

<a href="papers/papers.html#bbbb">Data Mining </a><li><a href="papers/papers.html#aaaa">Graph Partitioning </a><li><a href="papers/papers.html#aaaa">Parallel Solution of Sparse Linear System of Equations </a><li><a href="papers/papers.html#ffff">N-Body Computation and Dense Linear System Solvers

Page 8: Data and Representation

• Benzene Molecule: C6H6

Page 9: Data and Representation

Ordered Data

• Sequences of transactions

An element of the sequence

Items/Events

Page 10: Data and Representation

Ordered Data

• Genomic sequence data

GGTTCCGCCTTCAGCCCCGCGCCCGCAGGGCCCGCCCCGCGCCGTCGAGAAGGGCCCGCCTGGCGGGCGGGGGGAGGCGGGGCCGCCCGAGCCCAACCGAGTCCGACCAGGTGCCCCCTCTGCTCGGCCTAGACCTGAGCTCATTAGGCGGCAGCGGACAGGCCAAGTAGAACACGCGAAGCGCTGGGCTGCCTGCTGCGACCAGGG

Page 11: Data and Representation

Ordered Data

• Spatio-Temporal Data

Average Monthly Temperature of land and ocean

Page 12: Data and Representation

Geographic Data

Raster data consist of bit maps or pixel maps, in two or

more dimensions.

– Example 2-D raster image: satellite image of cloud cover, where

each pixel stores the cloud visibility in a particular area.

– Additional dimensions might include the temperature at different

altitudes at different regions, or measurements taken at different

points in time.

Page 13: Data and Representation

Vector data are constructed from basic geometric objects: points, line segments, triangles, and other polygons in two dimensions, and cylinders, spheres, cuboids, and other polyhedrons in three dimensions.

Vector format often used to represent map data.

− Roads can be considered as two-dimensional and represented by lines and curves.

− Some features, such as rivers, may be represented either as complex curves or as complex polygons, depending on whether their width is relevant.

− Features such as regions and lakes can be depicted as polygons.

Geographic Data

Page 14: Data and Representation

Some Typical Histograms

Dark image

Histogram Data

Page 15: Data and Representation

Bright image

Some Typical Histograms

Page 16: Data and Representation

Low contrast image

Some Typical Histograms

Page 17: Data and Representation

High contrast image

Some Typical Histograms

Page 18: Data and Representation

Attribute Values

Attribute values are numbers or symbols assigned to an attribute

Distinction between attributes and attribute values– Same attribute can be mapped to different attribute values

• Example: height can be measured in feet or meters.

– Different attributes can be mapped to the same set of values• Example: Attribute values for ID and age are integers

• But properties of attribute values can be different

– ID has no limit but age has a maximum and minimum value

Page 19: Data and Representation

Types of Attributes

There are different types of attributes– Nominal

• Examples: ID numbers, eye color, zip codes

– Ordinal• Examples: rankings (e.g., taste of potato chips on a scale from

1-10), grades, height in {tall, medium, short}

– Interval• Examples: calendar dates, temperatures in Celsius or

Fahrenheit.

– Ratio• Examples: temperature in Kelvin, length, time, counts

Page 20: Data and Representation

Properties of Attribute Values The type of an attribute depends on which of the following

properties it possesses:

– Distinctness : =

– Order : < >

– Addition/Subtraction : + -

– Multiplication/Division : * /

• Nominal attribute: distinctness

• Ordinal attribute: distinctness & order

• Interval attribute: distinctness, order & addition

• Ratio attribute: all 4 properties

Page 21: Data and Representation

Attribute Type Description Examples Operations

Nominal

The values of a nominal attribute are just different names, i.e., nominal attributes provide only enough information to distinguish one object from another. (=, )

Zip codes, employee ID numbers, eye color, sex: {male, female}

Mode, entropy, contingency correlation, 2 test

OrdinalThe values of an ordinal attribute provide enough information to order objects. (<, >)

Hardness of minerals, {good, better, best}, grades, street numbers

Median, percentiles, rank correlation, run tests, sign tests

Interval

For interval attributes, the differences between values are meaningful, i.e., a unit of measurement exists. (+, - )

Calendar dates, temperature in Celsius or Fahrenheit

Mean, standard deviation, Pearson's correlation, t and F tests

Ratio For ratio variables, both differences and ratios are meaningful. (*, /)

Temperature in Kelvin, monetary quantities, counts, age, mass, length, electrical current

Geometric mean, harmonic mean, percent variation

Page 22: Data and Representation

Discrete and Continuous Attributes

Discrete Attribute– Has only a finite or countably infinite set of values– Examples: zip codes, counts, or the set of words in a collection of documents – Often represented as integer variables. – Note: binary attributes are a special case of discrete attributes

Continuous Attribute– Has real numbers as attribute values– Examples: temperature, height, or weight. – Practically, real values can only be measured and represented using a finite

number of digits.– Continuous attributes are typically represented as floating-point variables.

Page 23: Data and Representation

Symbolic data are extensions of classical data. In conventional data, the data are individualized, where as in symbolic data, the data are more unified by means of some relationship. Symbolic data are internally variated and structured. They may contain several values linked by taxonomy or intervals with logical values.

Symbolic data are known facts of real world. They are generated when we summarize huge sets of data and it can be recorded as any of the following types of data :

(a) Single qualitative value : Looks=smart. (b) Single quantitative value : Weight=about 50 Kgs. (c) Crisp value : Empno=1001. (d) Single categorical value : Town=Mysore. (e) Multivalued : Qualification={B.Sc.,M.Sc.,Ph.D.} (f) Multivalued with weightage : Color={0.6 red, 0.8 green} (g) Intervalued or ranged values : Arrival time={9.00 to 10.00} (h) Data with logical dependency : if(Qualification=M.Sc.) then age>20

Symbolic Data

Page 24: Data and Representation

An instance of shape feature extraction using shape region and background region information

Page 25: Data and Representation

A model shape represented by multi-interval valued feature vector obtained by shape region and background region information

Page 26: Data and Representation

Model shapes represented by multi-interval valued features

Page 27: Data and Representation

Feature vectors representing shapes using their shape region information

Page 28: Data and Representation

Shape Representation Scheme-2

An instance of shape feature extraction using shape region and background region information

Page 29: Data and Representation

A model shape represented by multi-interval valued feature vector obtained by shape region and background region information

Page 30: Data and Representation

Feature vectors representing shapes using their shape region and background region information

Page 31: Data and Representation

Feature vectors representing shapes (whose axis of least inertia do not lie completely inside) using their shape region and background region information

Page 32: Data and Representation

Shape Representation Scheme-3

Fig. 10 An instance of shape feature extraction using Fuzzy Equilateral Triangle membership function

Page 33: Data and Representation

Fig. 11 A Triangle

Fuzzy Equilateral Triangle Membership Function:

Page 34: Data and Representation

A model shape represented by a multi-interval valued feature vector obtained using the fuzzy equilateral triangle membership function.

Page 35: Data and Representation

Feature vectors representing shapes using fuzzy equilateral triangle membership function.

Page 36: Data and Representation

Ten example shapes

Mean and Standard deviation of the pair wise similarity values obtained due to the three representation schemes on the shapes shown above

Page 37: Data and Representation

Leaf Classification

Page 38: Data and Representation

Samples of the model plant leaves in the dataset (Flavia Dataset)

Page 39: Data and Representation

Foliage Data Set

Page 40: Data and Representation

Tri-interval-valued Feature vector representing reference leaf in the leaf data base

Page 41: Data and Representation

Crisp tri-valued feature vector representing test leaf

Page 42: Data and Representation
Page 43: Data and Representation

Class-wise accuracy,

precision, recall and

F-Measure values

Page 44: Data and Representation

Class wise Accuracy

Page 45: Data and Representation

Class wise Precision

Page 46: Data and Representation

Class wise Recall

Page 47: Data and Representation

Class wise F-Measure

Page 48: Data and Representation

Gait Identification

Page 49: Data and Representation
Page 50: Data and Representation
Page 51: Data and Representation
Page 52: Data and Representation

Signature Verification

Page 53: Data and Representation
Page 54: Data and Representation

Data Quality

What kinds of data quality problems? How can we detect problems with the data? What can we do about these problems?

Examples of data quality problems:

– Noise and outliers

– Missing values

– Duplicate data

Page 55: Data and Representation

Noise

• Noise refers to modification of original values– Examples: distortion of a person’s voice when talking on a poor

phone and “snow” on television screen

Two Sine Waves Two Sine Waves + Noise

Page 56: Data and Representation

Outliers

Outliers are data objects with characteristics that are

considerably different than most of the other data objects in

the data set.

Page 57: Data and Representation

Missing Values

Reasons for missing values

– Information is not collected (e.g., people decline to give their age and weight)

– Attributes may not be applicable to all cases (e.g., annual income is not applicable to children)

Handling missing values

– Eliminate Data Objects

– Estimate Missing Values

– Ignore the Missing Value During Analysis

– Replace with all possible values (weighted by their probabilities)

Page 58: Data and Representation

Duplicate Data

Data set may include data objects that are duplicates, or almost duplicates of one another

– Major issue when merging data from heterogeneous sources

Examples:

– Same person with multiple email addresses

Data cleaning

– Process of dealing with duplicate data issues

Page 59: Data and Representation

Data Preprocessing

Aggregation

Sampling

Dimensionality Reduction

Feature subset selection

Feature creation

Discretization and Binarization

Attribute Transformation

Page 60: Data and Representation

Data Assimilation

The process by which observations are incorporated into an estimate of the initial atmospheric state.

– The true atmospheric state is unknowable.

– Want the best possible estimation while satisfying an appropriate balance condition within the model.

Observations are incorporated…

– Over a period of time (i.e., not suddenly at one time)

– Not just at the location of the observation

– Not just for the variable(s) observed

Page 61: Data and Representation

Data Assimilation

Objective of atmospheric data assimilation

The goal of data assimilation is to provide a dynamically

consistent motion picture of the atmosphere and oceans, in

three space dimensions, with known error bars.

Page 62: Data and Representation

Data Table

Page 63: Data and Representation

An Example

D : 25 year old student with medium income and fair credit card rating.

H : Hypothesis that our customer will buy our computer.

Will he buy a computer?

Medium Income

Fair Credit Rating

25 years old student

Page 64: Data and Representation

Example

H1 : Customer buys a computer = Yes

H2 : Customer buys a computer = No

Where H1 and H2 are subsets of our Hypothesis Space ‘H’

P(H/D) (Final Outcome) = max{ P(D/H1) P(H1), P(D/H2) P(H2)}

P(D) can be ignored as it is the same for both the terms

Page 65: Data and Representation

Example: Predicting a class label using Naïve Bayesian Classification.

We wish to predict the class label of an unknown sample using naïve Bayesian classification, given the same training data as shown in the table. The data samples are described by the attributes age, income, student, and credit-rating. The class label attribute, buys-computer has two distinct values (namely {yes, no}). Let C1 correspond to the class buys-computer = yes and C2 corresponds to buys-computer = no. The unknown sample we wish to classify is.

X = (age ≤30, income = medium, student = yes, credit-rating = fair)

We need to maximize P(X/Ci)P(Ci), for i = 1, 2. P(Ci), the prior

probability of each class, can be computed based on the training samples:

Page 66: Data and Representation
Page 67: Data and Representation

*****