Introduction to unsupervised learning

Warehouses and rings: K-Means, density, projecting to see

In this chapter, you will learn to

Tools: NumPy, scikit-learn

7 exercises

Each exercise is graded automatically, in your browser. The full statements are available once you have an account.

  1. What this is for in real life

    Most of the world's data has no labels: nobody wrote next to each point which group it belongs to. You have to find the structure yourself. - Customers. A retailer does not know in advance what "kinds" of…

  2. Three warehouses

    You are a logistics manager. You have 100 delivery addresses on a 2D map (in addresses, a 100×2 matrix). You must place 3 warehouses to minimize the total delivery distance. Each address is served from the…

  3. How many warehouses?

    Your placement method has proven itself: on the first city, you knew you needed three warehouses. A neighboring municipality now entrusts you with its deliveries too, but this time no one tells you how many warehouses…

  4. The impossible rings

    A new client has addresses that form strange patterns: two concentric rings. The data are in addresses (200, 2). You apply your warehouse strategy with k=2. It does not work. The cost is high and the groups it…

  5. The galaxy cartographer

    sklearn is forbidden for this exercise. You are a space cartographer. You are given N stars, each described by 8 measurements: X is an (N, 8) matrix, one row = one star, its 8 coordinates in space.…

  6. Lesson: t-SNE, a map to read with caution

    Projecting to 2D while preserving neighborhoods rather than global distances is the realm of non-linear dimensionality reduction. The most widespread tool is called t-SNE: it places the points in 2D so as to…

  7. The stellar rings

    sklearn forbidden for this exercise. Your cartographer has flattened another region of the sky into 2D. On this map, an organization jumps out: they gather into distinct structures, concentric rings and a…