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

      Never be 100% sure

      A classifier learns from targets: for a photo of a dog, the usual target is 100% dog and 0% for everything else (“Colors into numbers”). But its chances come from softmax (“Scores into chances”), which only reaches exactly 100% when the dog score is infinitely far above the rest, so a model chasing that target pushes its scores apart forever and grows overconfident (“Score a forecaster”). Write target(correct, classes, doubt): the chances to train toward for a photo whose right answer is class number correct (0 is the first) out of classes, keeping doubt (0 to 1) of your belief spread around.

      A dog photo, and the usual target: 100% dog. Watch a classifier train toward it: its chance for dog climbs and climbs, and never gets there, while its score runs away. So keep a little doubt, 0.2 of the belief spread around: where should every class’s chance end up?

      A photo of a dog.the usual target0%cat100%dog0%fox0%owlthe model’s chances, from its scorescat25%dogfoxowldog score0target(correct 1, classes 4, doubt 0.2) → cat ?, dog ?, fox ?, owl ??
      Your functiontarget(correct, classes, doubt)
      correctthe right class's number (0 is the first)e.g. 1
      classeshow many classes there aree.g. 4
      doubt0 to 1, how much of your belief to spread arounde.g. 0
      returnsthe chance to train toward for each class
      solution.pyLoading Python
      Sign in for an AI hint
      ← Random no-showsSame rule everywhere →