Bitpath

Boss lesson · Unit 02

Many weak models

Build a forest and a boosted model out of small trees

13 exercisesabout 3 min

What you practise

  • Bootstrap samples and bagging, a random forest votes, boosting fits the next tree to the errors of the last, what feature importance does and does not say

Try a question from this lesson

Pick one

Three classifiers are each right 70% of the time, and their mistakes are independent. You take the majority vote. How often is the vote right?

Hint

The vote is right when all three are right, or when exactly two are. Add those probabilities.

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

Bagging

One deep tree overfits: change a few rows and you get a different tree. Bagging turns that weakness into a method.

Draw a bootstrap sample: n rows picked at random with replacement, so some repeat and some are left out. Train one tree per sample, then let the trees vote.

Python
rng = np.random.default_rng(0)
rows = np.arange(6)
sample = rng.choice(rows, size=6)
print(sample.size)   # 6, with repeats

11 more exercises in the app

  • 5× multiple choice
  • 1× fill the blanks
  • 1× true or false
  • 2× type the answer
  • 1× order the lines
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy