Skip to content

Demo: RF CIs#279

Closed
swo wants to merge 2 commits into
mainfrom
swo_rf_ci
Closed

Demo: RF CIs#279
swo wants to merge 2 commits into
mainfrom
swo_rf_ci

Conversation

@swo
Copy link
Copy Markdown
Collaborator

@swo swo commented Mar 12, 2026

  • Very simple: make a single y=x line with some noise, then try to predict a value inside it
  • A bootstrap over trees gives a decent interval
  • A boostrap over forests gives a somewhat smaller interval (although as @Fuhan-Yang points out it doesn't shrink that fast with increasing trees; although that might have to do with my very small dataset here)

It's fairly straightforward to take a quantile over the predictions of trees in a forest, since RandomForestRegressor() has attribute .estimators_, which can be used to .predict() on the data.

@Fuhan-Yang
Copy link
Copy Markdown
Contributor

Fuhan-Yang commented Mar 16, 2026

The change seems to be the Option 1 we have talked about: bootstrap individual trees to get the interval. It is great to see that the manual bootstrapping over 100 individual trees has the same intervals with the random forest with 100 trees! Sounds good to me moving forward with this method. But hyperparameter tuning may not be avoidable when the prediction mean doesn't fit well, while a good thing is that we don't need to tune for intervals in this case.

Let me open a PR using this method on NIS data!

@swo
Copy link
Copy Markdown
Collaborator Author

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 swo_rf_ci 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