A team of tiny models guesses the prices of eight houses. Each is a stump: one split by size, one guess on each side, the average of whatever it is told to learn there. Each round a new stump learns a target and is added to the team. Write next_target(prices, team_prediction): what the next stump should learn, one number per house, so that every round brings the team closer to the prices.
Eight houses by size, each price a bold tick, and a team of stumps whose guesses are the bars. Round 1: a stump learns the prices, one guess each side of a split, and becomes the team. If the next stump learns the prices too, the team doubles, then triples. The goal is a team that gets closer every round, like the bars it ends on. Your next_target() says what each new stump learns.
next_target(prices, team_prediction)| prices | what each house sold for, in $1000s, smallest house first (a numpy array) | e.g. [150, 210, 190, 260, 330, 300, 410, 450] |
| team_prediction | what the team so far guesses for each house (a numpy array; all 0 before round 1) | e.g. [0, 0, 0, 0, 0, 0, 0, 0] |
| returns | what the next stump should learn: one number per house | |