Bootstrap training leaves some rows out of every tree. For regression, tree outputs are averaged rather than voted, and the trees that omitted a row form a free, honest evaluation set for that row. This exercise records those omitted indices and uses only them for out-of-bag error.
Implement bootstrap sampling with omitted indices, train a forest of (tree, oob_indices) pairs, average all tree predictions, and calculate OOB mean squared error.
oob_indices contains original positions never drawn in that tree's bag.n_trees with one advancing seeded generator.Open one at a time. Each gives away a little more than the last.
Mark every replacement-drawn index in a Boolean in_bag array; its inverse identifies omitted positions.
Keep one running OOB prediction sum and count per original row, then divide only where the count is positive.
No results yet
Run your code to check it against the examples, or submit to run every test.