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

ScaleMeaningful propertiesExample
NominalSame/differentEye colour, ID, postcode
OrdinalSame/different and orderLow/medium/high, grades
IntervalOrder and meaningful differencesCalendar dates, Celsius
RatioOrder, differences and meaningful ratiosHeight, time, counts, Kelvin

The progression is cumulative:

nominal -> ordinal -> interval -> ratio

An 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:

FieldLikely typeReason
Student IDNominalIdentifies, but has no meaningful order
AgeRatioDifferences and ratios can be meaningful
ProgrammeNominalCategories without order
SatisfactionOrdinalOrdered levels, unequal gaps possible
Exam dateInterval-likeDifferences 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.