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
      38 of 88

      Best question to ask

      A spam filter asks one yes/no question about each email, like “Does it mention a prize?”. The answer sorts a group of emails into left (yes) and right (no), each a list of labels: "spam" or "ham" (real mail). Before the question, telling whether a random email is spam takes some yes/no questions on average (“How surprising?”); once you know its side, it may take fewer. Write split_score(left, right): how many yes/no questions the question saved, on average. Count them in bits, as in “How surprising?”: one bit is one yes/no question.

      before the question
      spamspamspamhamspamhamhamham
      8 emails
      left (yes)
      spamspamspamham
      4 emails
      right (no)
      spamhamhamham
      4 emails
      solution.pyLoading Python
      ← How surprising?Planning for the wrong world →