liveBook · Manning

Dimension

As explained in Grokking Machine Learning, Second Edition

A coordinate or independent attribute needed to specify a data point, corresponding here to a dataset column.

A dimension is one independent attribute, or dataset column, needed to describe a data point. A dataset with five columns therefore has five dimensions. section 2.12

Think of dimensions as coordinates that locate each data point:

  • One dimension places points on a line, like houses identified by one number. section 2.12
  • Two dimensions place points in a city-like grid, using two numbers such as street and avenue. section 2.12
  • More dimensions add coordinates, even when the resulting space is difficult to picture. section 2.12

Housing and language data

A housing dataset might use size, bedrooms, bathrooms, crime rate, and school distance as five dimensions. A sentence represented by counts of aack, beep, and crack becomes a point such as (5, 8, 3), with three dimensions. section 2.12 section 5.9

Figure 2.8 How to imagine higher dimensional spaces: One dimension is like a street, in which each house only has one number. Two dimensions is like a flat city, in which each address has two numbers, a street and an avenue. Three dimensions is like a city with buildings, in which each address has three numbers: a street, an avenue, and a floor. Four dimensions is like an imaginary place in which each address has four numbers. We can imagine higher dimensions as another imaginary city in which addresses have as many coordinates as we need.

Use the address analogy to visualize one, two, three, and higher-dimensional data as points identified by increasing numbers of coordinates. section 2.12

How Grokking Machine Learning, Second Edition covers it

How deep it goes
Explains dimensions through columns, coordinates, geometric spaces, and sentence vectors before applying the idea to classifiers.
Examples
Illustrates dimensions with housing columns, room-price coordinates, city addresses, and word-count sentence points.
What you can do after
Evaluate/understand how columns become coordinates and how data occupies spaces with different numbers of dimensions.
How it connects
Connects dimensions with datasets, coordinates, dimensionality reduction, vectors, and perceptron classifiers.

Also explained in

Compare how 11 books explain dimension →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning, Second Edition. The section links point to the parts of the book it draws on.