Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      72 of 130

      Everyone is far away

      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.

      A scanner reads 300 numbers off each coin. Here are 40 known coins.known coins × 300 readingsrealfakeall 300 readingsnew coin 1 (real): distance to each known0the farthestnearest: fake, at 0.89 of the farthest○ real coin ● fake coin40 new coins: is each one’s nearest known coin its kind?realfake
      Your functionkeep_dims(points, labels)
      pointsthe 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…
      labelseach 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,…
      returnsthe readings to keep: a list of column numbers, e.g. [3, 41, 97]
      solution.pyLoading Python
      Sign in for an AI hint
      ← Miles vs millimetresAsk 25 bad judges →