• No results found

Data Mining (DM)

N/A
N/A
Protected

Academic year: 2020

Share "Data Mining (DM)"

Copied!
53
0
0

Loading.... (view fulltext now)

Full text

(1)

Data Mining (DM)

Lecture 3: Know your Data

(2)

Quiz 1-

(Non Graded)

What is the importance of 5Vs in Big Data Analysis?

What are the components of KDD process in Data

Science?

Differentiate the following terms:

A- Big Data Analysis B-Data Mining C-Data

Warehousing

How outlier Analysis can be helpful in banking?

What are the measurements to calculate interestingness

in data? Elaborate

(3)

3

Previous Lecture(s): Introduction

⚫ Why Data Mining?

⚫ What Is Data Mining?

⚫ A Multi-Dimensional View of Data Mining

⚫ What Kinds of Data Can Be Mined?

⚫ What Kinds of Patterns Can Be Mined?

⚫ What Kinds of Technologies Are Used?

⚫ What Kinds of Applications Are Targeted?

⚫ Major Issues in Data Mining

⚫ A Brief History of Data Mining and Data Mining Society

(4)

Announcements

Install Weka on your machines

Read about arff file format

E.g.

http://www.cs.waikato.ac.nz/ml/weka/arff.html

(5)

5

Chapter 2: Getting to Know Your Data

Data Objects and Attribute Types

Basic Statistical Descriptions of Data

Data Visualization

Measuring Data Similarity and Dissimilarity

(6)

6

Types of Data Sets

Record

Relational records

Data matrix, e.g., numerical matrix, crosstabs

Document data: text documents: term-frequency vector Transaction data

Graph and network World Wide Web

Social or information networks Molecular Structures

Ordered

Video data: sequence of images Temporal data: time-series

Sequential Data: transaction sequences Genetic sequence data

Spatial, image and multimedia: Spatial data: maps

Image data: Video data

(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)

15

Data Objects

Data sets are made up of data objects.

A data object represents an entity.

Examples:

sales database: customers, store items, sales

medical database: patients, treatments

university database: students, professors, courses

Also called samples , examples, instances, data points,

objects, tuples.

Data objects are described by attributes.

(16)

16

Attributes

Attribute (or dimensions, features, variables): a

data field, representing a characteristic or feature of

a data object.

o

E.g., customer _ID, name, address

Types:

o

Nominal

o

Binary

o

Ordinal

o

Numeric: quantitative

i.

Interval-scaled

ii.

Ratio-scaled

(17)

17

Attribute Types

Nominal: categories, states, or “names of things”

o Hair_color = {auburn, black, blond, brown, grey, red, white}

o marital status, occupation, ID numbers, zip codes

Binary

o Nominal attribute with only 2 states (0 and 1)

o Symmetric binary: both outcomes equally important

e.g., gender, the binary variable "is evergreen?" for a plant has the possible states "loses leaves in winter" and "does not lose leaves in winter." Both are equally valuable and carry the same weight.

o Asymmetric binary: outcomes not equally important. o e.g., medical test (positive vs. negative)

o Convention: assign 1 to most important outcome (e.g., HIV

positive)

Ordinal

o Values have a meaningful order (ranking) but magnitude between

successive values is not known.

(18)

18

Numeric Attribute Types

Quantity (integer or real-valued)

Interval

o

Measured on a scale of equal-sized units

o

Values have order and the difference between

each value is the same.

o

E.g., temperature in C˚or F˚, calendar date.

For example, the difference between 60 and 50

degrees is a measurable 10 degrees, as is the

difference between 80 and 70 degrees

o

No true zero-point

Ratio

o

Inherent zero-point

Zero mean no value or an absent of property.

(19)

19

Discrete vs. Continuous Attributes

Discrete Attribute

o

Has only a finite or countable infinite set of values

▪ E.g., zip codes, profession, or the set of words in a collection of

documents

o

Sometimes, represented as integer variables

o

Note: Binary attributes are a special case of discrete

attributes

Continuous Attribute

o

Has real numbers as attribute values

▪ E.g., temperature, height, or weight

o

Practically, real values can only be measured and

represented using a finite number of digits

o

Continuous attributes are typically represented as

(20)

Class Activity

eye color

hardness of minerals{good, better, best}

calendar dates

Sex {male, female}

Angles as measured in degree between 0

o

and 360

0

(21)

---Solution

Eye Color: Nominal

hardness of minerals{good, better, best}:Ordinal

calendar dates: Interval, discrete

Sex {male, female}:Nominal, binary(symmetric)

Angles as measured in degree between 0

o

and 360

0

:Ratio

(22)

22

Chapter 2: Getting to Know Your Data

Data Objects and Attribute Types

Basic Statistical Descriptions of Data

Data Visualization

Measuring Data Similarity and Dissimilarity

(23)

23

Basic Statistical Descriptions of Data

Motivation

To better understand the data: central tendency,

variation and spread

Data dispersion characteristics

median, max, min, quantiles, outliers, variance, etc.

Boxplot or quantile analysis on sorted intervals

Dispersion analysis on computed measures

(24)

24

Measuring the Central Tendency

⚫ Mean (algebraic measure) (sample vs. population):

Note: n is sample size and N is population size. ⚫ Weighted arithmetic mean:

⚫ Trimmed mean: chopping extreme values

⚫ Median:

⚫ Middle value if odd number of values, or average of the middle two values otherwise

⚫ Mode

⚫ Value that occurs most frequently in the data ⚫ Unimodal, bimodal, trimodal

(25)

Activity

Calculate Mean, Median, Mode

Data: 3, 1, 5

Suppose we have the following values for salary

(in thousands of dollars), shown in increasing

order:

(26)

February 28, 2019 Data Mining: Concepts and Techniques

26

Symmetric vs. Skewed Data

Median, mean and mode of symmetric,

positively and negatively skewed data

positively skewed negatively skewed symmetric

(27)

Find different sets which have same

mean, median and mode (symmetric)

(28)

3,4,5,5,8

1,1,1

(29)

29

Measuring the Dispersion of Data

⚫ Quartiles, outliers and box-plots

Quartiles: Q1 (25th percentile), Q3 (75th percentile)

Inter-quartile range: IQR = Q3 – Q1

Five number summary: min, Q1,

median,Q3, max

Box-plot: ends of the box are the

quartiles; median is marked; add

whiskers, and plot outliers individually

Outlier: usually, a value higher/lower

than 1.5 x IQR

(30)

30

Boxplot Analysis

Five-number summary of a distributionMinimum, Q1, Median, Q3, Maximum

Boxplot

⚫ Data is represented with a box

⚫ The ends of the box are at the first and third

quartiles, i.e., the height of the box is IQR

⚫ The median is marked by a line within the box

⚫ Whiskers: two lines outside the box extended to

Minimum and Maximum

⚫ Outliers: points beyond a specified outlier

(31)

Class activity

54,60,65,66,67,69,70,72,73,75,76,89,90,92,95,100,115

,

(32)
(33)

February 28, 2019 Data Mining: Concepts and Techniques

33

(34)

34

Graphic Displays of Basic Statistical Descriptions

Boxplot: graphic display of five-number summary

Histogram: x-axis are values, y-axis repres. frequencies

Quantile plot: each value x

i

is paired with f

i

indicating

that approximately 100 f

i

% of data are ≤ x

i

Quantile-quantile (q-q) plot: graphs the quantiles of one

univariant distribution against the corresponding quantiles

of another

Scatter plot: each pair of values is a pair of coordinates

(35)

35

Histogram Analysis

⚫ Histogram: Graph display of tabulated

frequencies, shown as bars

⚫ It shows what proportion of cases fall

into each of several categories

⚫ Differs from a bar chart in that it is the

area of the bar that denotes the value,

not the height as in bar charts, a

crucial distinction when the categories are not of uniform width

⚫ The categories are usually specified

as non-overlapping intervals of some variable. The categories (bars) must be adjacent

(36)

36

Histograms Often Tell More than Boxplots

■ The two histograms shown

in the left may have the same boxplot

representation

■ The same values for:

min, Q1, median, Q3, max

■ But they have rather

(37)

Data Mining: Concepts and Techniques

37

Quantile Plot

Displays all of the data (allowing the user to assess both

the overall behavior and unusual occurrences)

Plots quantile information

For a data x

i

data sorted in increasing order, f

i

indicates

that approximately 100 f

i

% of the data are below or

equal to the value x

i

(38)

38

Quantile-Quantile (Q-Q) Plot

⚫ Graphs the quantiles of one uni-variate distribution against the

corresponding quantiles of another

⚫ View: Is there is a shift in going from one distribution to another?

⚫ Example shows unit price of items sold at Branch 1 vs. Branch 2 for

each quantile. Unit prices of items sold at Branch 1 tend to be lower than those at Branch 2.

(39)

39

Scatter plot

Provides a first look at bivariate data to see clusters of

points, outliers, etc.

Each pair of values is treated as a pair of coordinates and

(40)

40

Positively and Negatively Correlated Data

⚫ The left half fragment is positively correlated

(41)

41

(42)

42

Chapter 2: Getting to Know Your Data

Data Objects and Attribute Types

Basic Statistical Descriptions of Data

Data Visualization

Measuring Data Similarity and Dissimilarity

(43)
(44)
(45)

45

Data Visualization

⚫ Why data visualization?

⚫ Gain insight into an information space by mapping data onto graphical

primitives

⚫ Provide qualitative overview of large data sets

⚫ Search for patterns, trends, structure, irregularities, relationships

among data

⚫ Help find interesting regions and suitable parameters for further

quantitative analysis

⚫ Provide a visual proof of computer representations derived

⚫ Categorization of visualization methods:

⚫ Pixel-oriented visualization techniques

⚫ Geometric projection visualization techniques

⚫ Icon-based visualization techniques

⚫ Hierarchical visualization techniques

(46)

46

Pixel-Oriented Visualization Techniques

⚫ For a data set of m dimensions, create m windows on the screen, one

for each dimension

⚫ The m dimension values of a record are mapped to m pixels at the

corresponding positions in the windows

⚫ The colors of the pixels reflect the corresponding values

(47)

47

Laying Out Pixels in Circle Segments

⚫ To save space and show the connections among multiple dimensions,

space filling is often done in a circle segment

(a) Representing a data record in

circle segment (b) Laying out pixels in circle segment

Representing about 265,000 50-dimensional Data Items with the ‘Circle Segments’ Technique

(48)

48

Geometric Projection Visualization

Techniques

Visualization of geometric transformations and projections

of the data

Methods

Scatterplot and scatterplot matrices

Parallel coordinates

(49)
(50)
(51)
(52)

52

Chapter 2: Getting to Know Your Data

Data Objects and Attribute Types

Basic Statistical Descriptions of Data

Data Visualization

Measuring Data Similarity and Dissimilarity

(53)

Quiz 2

References

Related documents

We conduct a comparison between DG3 (three-point discontinuous Galerkin scheme; Huynh, 2007), MCV5 (fifth- order multi-moment constrained finite volume scheme; Ii and Xiao, 2009)

Specifically, passive participants were shown all the screenshots given to active participants in Stage I and Stage II, and, after being informed about whether that active

Morphologically undisturbed galaxies dominate the total infrared luminosity density and SFR density: at z 0 : 7, more than half of the intensely star-forming galaxies have

15 When regulations allow nurse practitioners a full scope of practice, areas with shortages of primary care health professionals, including rural areas, attract higher numbers

Potential explanations for the large and seemingly random price variation are: (i) different cost pricing methods used by hospitals, (ii) uncertainty due to frequent changes in

[r]

property, it is often the desire of the shareholders to transfer the leased ground (and perhaps some equipment) to the newly created corporation with the intention that the departing

(b) If the originator is not a bank and proves that the person identified by number was not entitled to receive payment from the originator, the originator is not obliged to pay