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

4 - Ch4 - Data Objects and Attribute Types

The document discusses different types of attributes that can describe data objects. It defines nominal, binary, ordinal and numeric attributes and provides examples of each. Numeric attributes are further divided into interval-scaled and ratio-scaled. The key differences between attribute types are in the nature of their values and whether only equality or both equality and order can be determined.

Uploaded by

mazeen naser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

4 - Ch4 - Data Objects and Attribute Types

The document discusses different types of attributes that can describe data objects. It defines nominal, binary, ordinal and numeric attributes and provides examples of each. Numeric attributes are further divided into interval-scaled and ratio-scaled. The key differences between attribute types are in the nature of their values and whether only equality or both equality and order can be determined.

Uploaded by

mazeen naser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Chapter 4

Data Objects and Attribute Types

7/4/2023 1
• An attribute is a data field, representing a characteristic or feature of a data object.
• The nouns attribute, dimension, feature, and variable are often used
interchangeably in the literature
• The term dimension is commonly used in data warehousing.
• Machine learning literature tends to use the term feature,
• statisticians prefer the term variable.
• Data mining and database professionals commonly use the term attribute, and we
do here as well.
• Attributes describing a customer object can include, for example, customer ID,
name, and address.
• Observed values for a given attribute are known as observations.

7/4/2023 2
• Attributes may be classified into two main types depending on their domain,
that is, depending on the types of values they take on.

• Example 1 statues of student ( pass, fail)


• Example student marks ( VERY GOOD , GOOD ,….)

• Students Hakmah university


• marital status

7/4/2023 3
• Type of an attribute
The type of an attribute is determined by the set of possible values
1—Nominal,
2- Binary,
3- Ordinal,
4 -Numeric
Note : Numeric
attributes can be classified further into two types:
- Interval-scaled
- Ratio-scaled

7/4/2023 4
• Nominal Attributes
Nominal means “relating to names.”
• The values of a nominal attribute are symbols or names of things.
• Each value represents some kind of category, code, or state, and so nominal
attributes are also referred to as categorical.
• The values do not have any meaningful order.

Example 1 Nominal attributes. describing person objects (hair color and marital
status )
• Hair color, possible values for hair color are black, brown, blond, red, auburn, gray,
and white.
• The attribute marital status can take on the values single, married, divorced, and
widowed.
• Both hair color and marital status are nominal attributes.
• Another example of a nominal attribute is
• Occupation, with the values teacher, dentist, programmer, farmer, and so on.
7/4/2023 5
•Binary Attributes
A binary attribute is a nominal attribute with only two categories or states: 0 or
1, where 0 typically means that the attribute is absent, and 1 means that it is
present.
• Binary attributes are referred to as Boolean if the two states correspond to true
and false

Example 1 Binary attributes. Given the attribute smoker describing a patient
object, 1 indicates that the patient smokes, while 0 indicates that the patient
does not. Similarly, suppose the patient undergoes a medical test that has two
possible outcomes.
• The attribute medical test is binary, where a value of 1 means the result of the
test for the patient is positive, while 0 means the result is negative

7/4/2023 6
• Ordinal Attributes

An ordinal attribute is an attribute with possible values that have a meaningful order
or ranking among them, but the magnitude between successive values is not known.

Example 1 Ordinal attributes. Suppose that drink size corresponds to the size of
drinks available at a fast-food restaurant.
• This nominal attribute has three possible values: small, medium,
and large.
• The values have a meaningful sequence (which corresponds to increasing
drink size);
• However, we cannot tell from the values how much bigger, say, a medium
is than a large.
• Other examples of ordinal attributes include grade (e.g., A , B, C and so on)
• for example, assistant, associate, and full for professors,

7/4/2023 7
• Numeric Attributes
A numeric attribute is quantitative; that is, it is a measurable quantity, represented in
integer or real values.
• For example, Age with domain(Age) = N, where N denotes the set of natural numbers
(non-negative integers)
• Numeric attributes that take on a finite or countably infinite set of values are called
discrete, whereas those that can take on any real value are called continuous.
• As a special case of discrete, if an attribute has as its domain the set {0,1}, it is called a
binary attribute.

• Numeric attributes can be interval-scaled or ratio-scaled


• EXAMPLE

7/4/2023 8
•Interval-Scaled Attributes
Interval-scaled attributes are measured on a scale of equal-size units.
• The values of interval-scaled attributes have order and can be positive, 0, or negative.
• Thus, in addition to providing a ranking of values, such attributes allow us to compare
and quantify the difference between values.

Example 2.4 Interval-scaled attributes. A temperature attribute is interval-scaled.
Suppose that we have the outdoor temperature value for a number of different days,
where each day is an object.
• By ordering the values, we obtain a ranking of the objects with respect to
temperature.
• In addition, we can quantify the difference between values.
• For example, a temperature of 20◦C is five degrees higher than a temperature of 15◦C.
Calendar dates
Example. For instance, the years 2002 and 2010 are eight years apart.
7/4/2023 9
• Ratio-Scaled Attributes

A ratio-scaled attribute is a numeric attribute with an inherent zero-point.
• That is, if a measurement is ratio-scaled, we can speak of a value as being a multiple (or
ratio)of another value.
• In addition, the values are ordered, and we can also compute the difference between
values, as well as the mean, median, and mode.

Example 2.5 Ratio-scaled attributes. Unlike temperatures in Celsius and Fahrenheit, the
Kelvin (K) temperature scale has what is considered a true zero-point (0◦K D -273.15◦C): It is
the point at which the particles that comprise matter have zero kinetic energy.
• Other examples of ratio-scaled attributes include count attributes such as years of
experience (e.g., the objects are employees) and number of words (e.g., the objects are
documents).
• Additional examples include attributes to measure weight, height, latitude and longitude
• coordinates (e.g., when clustering houses), and monetary quantities (e.g., you are 100
times richer with $100 than with $1).

7/4/2023 10
• Categorical Attributes
A categorical attribute is one that has a set-valued domain composed of a set
of symbols. For example, Sex and Education could be categorical attributes
with their domains given as domain(Sex) = {M,F}
domain(Education) = {HighSchool,BS,MS,PhD}

7/4/2023 11
• Categorical attributes may be of two types:

• Nominal: The attribute values in the domain are unordered, and thus only
equality comparisons are meaningful. That is, we can check only whether the
value of the attribute for two given instances is the same or not. For example,
Sex is a nominal attribute. Also class in Table 1.1 is a nominal attribute with
domain(class) ={iris-setosa, iris-versicolor, iris-virginica}.

7/4/2023 12
• Ordinal: The attribute values are ordered, and thus both equality
comparisons (is one value equal to another?) and inequality
comparisons (is one value less than or greater than another?) are
allowed, though it may not be possible to quantify the difference
between values. For example, Education is an ordinal attribute because
its domain values are ordered by increasing educational qualification.

7/4/2023 13
• END

7/4/2023 14

You might also like