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

      Leave room

      Sheep (+1) and goats (−1) share a field, each animal at a spot [x, y]. A straight fence line = [w1, w2, b] splits it: a spot is on the sheep side when w1 * x + w2 * y + b is positive and on the goat side when it’s negative. Write safety(points, labels, line): how safely the fence keeps the herds apart. Negative if any animal is on the wrong side.

      the field and the fence [1, 0, −3], the line x − 3 = 0● sheep (+1) ○ goat (−1)sheep side
      solution.pyLoading Python
      ← Two pizza shopsScores into chances →