Bootstrap Sample
noun
say it: “BOOT-strap SAM-pul” /ˈbutˌstræp ˈsæmpəl/
A random sample of the same size as the original data, drawn with replacement, so some items appear more than once and others not at all.
What is a bootstrap sample?
A bootstrap sample is drawn at random from the rows with replacement, as many rows as there are, so some rows come up twice or more and others are left out. Each tree in a random forest learns from its own bootstrap sample, which is part of why the trees differ.
import random
random.seed(0)
homes = ["A", "B", "C", "D", "E"]
print(random.choices(homes, k=len(homes))) # ['E', 'D', 'C', 'B', 'C']: C twice, no A
In a sentence
- “Each tree in the forest learned from a different bootstrap sample.”
- “The tree's bootstrap sample had home C twice and no home A.”
Level: Freelancer · More AI Basics terms at this level
Updated