A scanner reads 300 numbers off every coin. Only a few of them tell a real coin from a fake; the rest are scratches, dust and light. A new coin is judged by its nearest known coin. Write keep_dims(points, labels): given the known coins and their kinds, say which readings to keep, as a list of column numbers. The puzzle then judges 40 new coins on your readings alone.
Known coins, a row each, with 300 scanner readings across (dark is low, light is high): real coins on top, fakes below. A new coin is judged by its nearest known coin. With a few good readings that works; with all 300, everyone is far away and the nearest is a coin flip. The goal is a judge like the one it ends on. Your keep_dims(points, labels) picks the readings.
keep_dims(points, labels)| points | the known coins, one row each, 300 scanner readings across (a numpy array) | e.g. [[4.76, 4.42, 3.49, 4.88, 4.23, 5.56, 4.81… |
| labels | each coin's kind, 1 for fake and 0 for real (a numpy array) | e.g. [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,… |
| returns | the readings to keep: a list of column numbers, e.g. [3, 41, 97] | |