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
      31 of 102

      Yes or no chances

      A model answers a yes-or-no question (is there a cat in this photo?) with a score: positive leans yes, negative leans no, and it can be any size. Write chance_yes(score): turn the score into the chance of yes.

      A cat detector scores photos: positive leans “a cat”, negative leans “no cat”, and a score can be any size. The obvious way to turn a score into a chance is a straight rule, 50% plus 10% per point. Watch what it does with a big score.

      A model that answers yes or no gives a score, not a chance.−15−10−5051015← leans “no cat”the detector’s scoreleans “a cat” →0%50%100%chance there’s a catchance_yes(score) → a chance for any score, always between 0% and 100%?
      Your functionchance_yes(score)
      scoreone number, positive leans yes, negative leans noe.g. −6
      returnsthe chance of yes
      solution.pyLoading Python
      Sign in for an AI hint
      ← Scores into chancesConfident or cautious →