Skip to content

Compare two prediction errors from RF in toy data #278

Closed
Fuhan-Yang wants to merge 2 commits into
mainfrom
fy_rf_error
Closed

Compare two prediction errors from RF in toy data #278
Fuhan-Yang wants to merge 2 commits into
mainfrom
fy_rf_error

Conversation

@Fuhan-Yang
Copy link
Copy Markdown
Contributor

@Fuhan-Yang Fuhan-Yang commented Mar 12, 2026

Here is a EDA of the prediction errors from random forest using a toy data. The data is created in the way suited for linear regression. Then linear regression and random forest are used to fit the training data (80% of the total data) and do out-of-sample prediction. The prediction mean along with the prediction interval are plotted. The intervals were calculated in two ways for random forest: V_UIJ used by Wager et al and out-of-bag error by Lu et al., given number of trees varying within [100,1000, 5000, 10000]. We can see the prediction intervals are pretty consistent as the increase of trees. The OOB method creates wider interval than V_UIJ. Note that the width of the interval is the same across all the predictions for OOB, which assumes that the uncertainty is consistent across time. Applying this in vaccine coverage, this assumes that the prediction uncertainty of end-of-season coverage is the same as predicting the coverage one month after the forecast date. @swo

image

@swo
Copy link
Copy Markdown
Collaborator

swo commented Mar 12, 2026

This is still kind of a complicated example. See #279 for something very very simple.

I'm also still confused about how we'd use any method that does test/training split or in- vs. out-of-bag distinctions. We're interested in forecasting, so the target isn't in-bag or out-of-bag; it's just not in the dataset.

My emerging conclusion is to either (1) take the interval over trees or (2) switch to gradient boosting.

@swo
Copy link
Copy Markdown
Collaborator

swo commented Mar 23, 2026

We agreed to do an interval over trees' prediction

@swo swo closed this Mar 23, 2026
@swo swo deleted the fy_rf_error branch March 23, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants