0% found this document useful (0 votes)
8 views

Data Mining Lecture2-2

ملنمكلرز رو منابرنمنبدنمكةمزا

Uploaded by

Youssef Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Data Mining Lecture2-2

ملنمكلرز رو منابرنمنبدنمكةمزا

Uploaded by

Youssef Mohamed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Introduction to Data Mining

Lecture 2
Outline

● Attributes and Objects

● Types of Data

● Data Quality
What is Data?

● Collection of data objects Attributes


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

Objects
variable, field, characteristic,
dimension, or feature
● A collection of attributes
describe an object
– Object is also known as
record, point, case, sample,
entity, or instance
Attribute Values

● Attribute values are numbers or symbols assigned


to an attribute for a particular object

● 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 can be different than the
properties of the values used to represent the
attribute
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 {tall, medium, short}
– Interval
 Examples: calendar dates, temperatures in Celsius or
Fahrenheit.
– Ratio
 Examples: temperature in Kelvin, length, counts, elapsed
time (e.g., time to run a race)
Properties of Attribute Values
● The type of an attribute depends on which of the
following properties/operations it possesses:
– Distinctness: = 
– Order: < >
– Differences are + -
meaningful :
– Ratios are * /
meaningful
– Nominal attribute: distinctness
– Ordinal attribute: distinctness & order
– Interval attribute: distinctness, order & meaningful
differences
– Ratio attribute: all 4 properties/operations
Difference Between Ratio and Interval
● Is it physically meaningful to say that a
temperature of 10 ° is twice that of 5° on
– the Celsius scale?
– the Fahrenheit scale?
– the Kelvin scale?
● Consider measuring the height above average
– If Bill’s height is three inches above average
and Bob’s height is six inches above average,
then would we say that Bob is twice as tall as
Bill?
– Is this situation analogous to that of
temperature?
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.
Asymmetric Attributes
● Only presence (a non-zero attribute value) is regarded as
important
 Words present in documents
 Items present in customer transactions

● If we met a friend in the grocery store would we ever say


the following?
“I see our purchases are very similar since we didn’t buy
most of the same things.”
Critiques of the attribute categorization

● Incomplete
– Asymmetric binary
– Cyclical
– Multivariate
– Partially ordered
– Partial membership
– Relationships between the data

● Real data is approximate and noisy


– This can complicate recognition of the proper attribute type
– Treating one attribute type as another may be approximately
correct
Key Messages for Attribute Types

● The types of operations you choose should be “meaningful”


for the type of data you have
– Distinctness, order, meaningful intervals, and
meaningful ratios are only four (among many possible)
properties of data

– The data type you see – often numbers or strings – may


not capture all the properties or may suggest properties
that are not present

– Analysis may depend on these other properties of the


data
 Many statistical analyses depend only on the distribution

– In the end, what is meaningful can be specific to domain


Important Characteristics of Data
– Dimensionality (number of attributes)
 High dimensional data brings a number of challenges

– Sparsity
 Only presence counts

– Resolution
 Patterns depend on the scale

– Size
 Type of analysis may depend on size of data
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
Record Data

● Data that consists of a collection of records, each


of which consists of a fixed set of attributes
Data Matrix

● If data objects have the same fixed set of numeric


attributes, then the data objects can be thought of as
points in a multi-dimensional space, where each
dimension represents a distinct attribute

● Such a data set can be represented by an m by n matrix,


where there are m rows, one for each object, and n
columns, one for each attribute
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.
Transaction Data
● A special type of data, where
– Each 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.
– Can represent transaction data as record data
Graph Data
● Examples: Generic graph, a molecule, and webpages

Benzene Molecule: C6H6


Ordered Data

● Sequences of transactions
Items/Events

An element of the
sequence
Ordered Data

● Genomic sequence data


Ordered Data

● Spatio-Temporal Data

Average Monthly
Temperature of
land and ocean
Data Quality

● Poor data quality negatively affects many data


processing efforts

● Data mining example: a classification model for detecting


people who are loan risks is built using poor data
– Some credit-worthy candidates are denied loans
– More loans are given to individuals that default
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
– Wrong data
– Fake data
– Missing values
– Duplicate data
Noise
● For objects, noise is an extraneous object
● For attributes, 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
– The figures below show two sine waves of the same magnitude and
different frequencies, the waves combined, and the two sine waves with
random noise
 The magnitude and shape of the original signal is distorted
Outliers

● Outliers are data objects with characteristics that


are considerably different than most of the other
data objects in the data set
– Case 1: Outliers are
noise that interferes
with data analysis
– Case 2: Outliers are
the goal of our analysis
 Credit card fraud
 Intrusion detection

● Causes?
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 or variables
– Estimate missing values
 Example: time series of temperature
 Example: census results

– Ignore the missing value during analysis


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

● When should duplicate data not be removed?

You might also like