Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £35.99 £24.99. New subscribers only T&Cs apply

Find out more

Modelling Real World Data

How do we represent measurements from the real world using data scientific techniques? Lovisa Sundin and Jeremy Singer discuss standard approaches.
JEREMY: Hey, Lovisa. When we’re modelling data in the real world, sometimes it’s a bit confusing to know exactly how to model the attributes. Can you give us an example, maybe?
LOVISA: It’s very true. If we just take these lollipops that I happened to find in my pocket, then we will find out how we choose to model it depends very much on who we are, what our goals are, and what the context is. So if I were a physicist, for example, and I wanted to model the colour of these lollipops, then I know that colour is a physical wavelength, and a continuous attribute.
LOVISA: But if I were a computer scientist, then I would know that these colours would be encoded as discrete bit strings, so it would be a numerical, but discrete, attribute.
JEREMY: Or, if you’re using CSS, you could say colour equals purple, or colour equals red, and they’d be strings.
LOVISA: That’s true. See, it depends on context. But if I were an artist, then I would perhaps, categorise these as different pigments and it would be a categorical attribute. But I think we can all agree that what comes most naturally to us would be to model this as a categorical attribute in terms of the good ones, and the disgusting ones.
JEREMY: Oh, no, blackcurrant is my favourite. Thanks, Lovisa.
LOVISA: Thanks. That leaves me with three.

In general, data is either numbers (numerical data) or labelled values from a limited set of possible values (categorical data).

Numerical data may be discrete (whole numbers) or continuous (real numbers, with decimal points).

As a short exercise, think of an example of numerical data and categorical data for features from the following data sets:

  1. Scotland’s 2001 census data
  2. Bicycles in the Glasgow city bike hire scheme
  3. Olympic Games athletes data

As a further thought experiment, can you see how values of these different kinds might map onto the concrete data types Jeremy introduced in an earlier video?

This article is from the free online

Getting Started with Teaching Data Science in Schools

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now