Lecture: Lecture 08 - Data Preprocessing
Objects, attributes and values
A dataset contains objects such as students or transactions. An attribute describes an object, such as age or programme. An attribute value is the particular value for one object.
The same stored format can have different meanings. Student ID 200 is not twice Student ID 100. Numeric storage does not automatically make arithmetic meaningful.
Four attribute scales
| Scale | Meaningful properties | Example |
|---|---|---|
| Nominal | Same/different | Eye colour, ID, postcode |
| Ordinal | Same/different and order | Low/medium/high, grades |
| Interval | Order and meaningful differences | Calendar dates, Celsius |
| Ratio | Order, differences and meaningful ratios | Height, time, counts, Kelvin |
The progression is cumulative:
nominal -> ordinal -> interval -> ratioAn interval scale has an arbitrary zero. Celsius temperatures can be subtracted, but 20°C is not twice 10°C. A ratio scale has a meaningful zero, so ratios are meaningful.
Discrete and continuous
- Discrete: separate countable values, such as number of purchases or words.
- Continuous: measurements on a numerical range, such as height or temperature.
This distinction concerns the possible values, while nominal/ordinal/interval/ratio concerns the operations that make sense.
Dataset structures
- Record data: fixed attributes in rows.
- Document data: documents represented by term vectors.
- Transaction data: each object is a set of items.
- Graph data: nodes connected by edges.
- Ordered data: sequence, temporal, spatial or genetic order matters.
Example
For a student record:
| Field | Likely type | Reason |
|---|---|---|
| Student ID | Nominal | Identifies, but has no meaningful order |
| Age | Ratio | Differences and ratios can be meaningful |
| Programme | Nominal | Categories without order |
| Satisfaction | Ordinal | Ordered levels, unequal gaps possible |
| Exam date | Interval-like | Differences between dates are meaningful |
Retrieval questions
Why cannot an ID be averaged? It is a label, not a measured quantity; its numeric appearance is accidental.
Why is satisfaction usually ordinal? “High” is above “medium,” but the gap between levels is not guaranteed to be equal.
Why does data structure matter? A document, transaction, graph and time sequence require different representations and comparison methods.
Source
Elena Baralis and Tania Cerquitelli, Data preprocessing, PDF pages 4-19. Added student examples are study explanations.