<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry" -->

---
title: Model-agnostic prediction intervals in Python and R:...
description: A large benchmark tests nnetsauce's QuantileRegressor, a wrapper that turns any sklearn-compatible regressor into a quantile machine by optimizing an offset to...
canonical: https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Model-agnostic prediction intervals in Python and R: does nnetsauce’s `QuantileRegressor` hold up? | daily.dev
og:description: A large benchmark tests nnetsauce's QuantileRegressor, a wrapper that turns any sklearn-compatible regressor into a quantile machine by optimizing an offset to...
og:url: https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry
og:image: https://api.daily.dev/og/posts/VBnFiMRRy.png
og:image:alt: Model-agnostic prediction intervals in Python and R: does nnetsauce’s `QuantileRegressor` hold up?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Model-agnostic prediction intervals in Python and R: does nnetsauce’s `QuantileRegressor` hold up?

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 17 min read · 0 upvotes · 0 comments

## Summary

A large benchmark tests nnetsauce's QuantileRegressor, a wrapper that turns any sklearn-compatible regressor into a quantile machine by optimizing an offset to minimize pinball loss. Across 2,736 fits spanning 38 regressors, 6 datasets, 5 scoring strategies, and 2 coverage levels, the wrapper's residuals scoring roughly matches sklearn's native QuantileRegressor and its splitconformal-based sibling PredictionInterval turns out best-calibrated overall, never collapsing on any estimator. The critical failure mode: pairing the wrapper with estimators capable of near-perfect training-data interpolation, specifically unconstrained DecisionTreeRegressor, ExtraTreeRegressor, and noiseless GaussianProcessRegressor, causes the optimizer to collapse intervals to zero width in nearly every run, while every other tested estimator (linear models, SVR family, KNN, RANSAC, TheilSen, GLMs, Bagging) never collapsed once. The R version is confirmed to be a thin reticulate wrapper calling the identical Python object, so auditing the Python source is equivalent to auditing R behavior. Practical guidance: default to residuals or conformal scoring for simplicity, use PredictionInterval(splitconformal) for robustness, avoid unconstrained trees/noiseless GPs, and always verify coverage on a genuine holdout for the specific use case.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/09/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauces-quantileregressor-hold-up>

## Questions this post answers

### Why does nnetsauce's QuantileRegressor produce zero-width prediction intervals when wrapping a DecisionTreeRegressor?

An unconstrained decision tree or a noiseless Gaussian process can memorize its own training data almost perfectly, driving training residuals to near zero. Because QuantileRegressor optimizes its interval-width multiplier by minimizing pinball loss on data the base model already fit, the optimizer correctly finds that a zero-width interval nearly achieves minimum loss, so it collapses the interval. In testing, DecisionTreeRegressor and ExtraTreeRegressor collapsed on all 12 runs (6 datasets x 2 coverage levels) regardless of scoring strategy, and GaussianProcessRegressor collapsed on 9-10 of 12 runs.

_Anyone tuning prediction intervals with tree-based or GP models can find pitfalls like this discussed on daily.dev._

### How does nnetsauce's QuantileRegressor scoring strategy compare to PredictionInterval with splitconformal for coverage accuracy?

PredictionInterval with splitconformal was the best-calibrated method in a benchmark of 38 sklearn regressors, achieving mean coverage of 0.81 at an 80% target and 0.95 at a 95% target, and it never produced a collapsed interval. QuantileRegressor with residuals scoring reached 0.77 and 0.92 respectively, essentially matching or beating sklearn's native linear QuantileRegressor, which scored 0.76 and 0.87.

_Choosing between conformal and quantile-based interval methods gets easier with benchmarks like this surfaced on daily.dev._

### Which scikit-learn regressors are safe to use with nnetsauce's QuantileRegressor without risking collapsed prediction intervals?

Thirty-four of 38 tested regressors never collapsed under any QuantileRegressor scoring mode, including the entire linear family (Ridge, Lasso, ElasticNet, BayesianRidge), SVR, NuSVR, LinearSVR, KernelRidge, KNeighborsRegressor, RANSACRegressor, TheilSenRegressor, Bagging­Regressor, and PassiveAggressiveRegressor. The four risky estimators were DecisionTreeRegressor, ExtraTreeRegressor, GaussianProcessRegressor, and occasionally AdaBoostRegressor under conformal scoring modes.

_Developers picking a base regressor for interval estimation can track findings like this via daily.dev._

## Similar posts on daily.dev

- [Introduction to Quantile regression](https://daily.dev/posts/introduction-to-quantile-regression-x4ulwuliz) · Daily Dose of Data Science \| Avi Chawla \| Substack · 0 upvotes · 0 comments
- [Conformalized TabICL: Prediction Intervals for a State-Of-The-Art Tabular Foundation Model in Python and R](https://daily.dev/posts/conformalized-tabicl-prediction-intervals-for-a-state-of-the-art-tabular-foundation-model-in-python-bpkv5otnn) · R-bloggers · 1 upvotes · 0 comments
- [Conformalized TabPFN: Prediction Intervals for a Pretrained Transformer for Tabular Data in Python and R](https://daily.dev/posts/conformalized-tabpfn-prediction-intervals-for-a-pretrained-transformer-for-tabular-data-in-python-a-e2syy4dbx) · R-bloggers · 0 upvotes · 0 comments
- [My Model Was Cheating on Its Own Test](https://daily.dev/posts/my-model-was-cheating-on-its-own-test-sgd7sbpc1) · Towards Data Science · 0 upvotes · 0 comments

---

Tags: [#scikit](https://daily.dev/tags/scikit)

[View this post on daily.dev](https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Model-agnostic prediction intervals in Python and R: does nnetsauce’s `QuantileRegressor` hold up?","url":"https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry"},"datePublished":"2026-09-14T07:59:46.044Z","dateModified":"2026-09-14T08:00:13.965Z","description":"A large benchmark tests nnetsauce's QuantileRegressor, a wrapper that turns any sklearn-compatible regressor into a quantile machine by optimizing an offset to...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ebb93d582781130e101b3634a102098?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7ebb93d582781130e101b3634a102098?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"scikit","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"Model-agnostic prediction intervals in Python and R: does nnetsauce’s `QuantileRegressor` hold up?"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/model-agnostic-prediction-intervals-in-python-and-r-does-nnetsauce-s-quantileregressor-hold-up--vbnfimrry#faq","mainEntity":[{"@type":"Question","name":"Why does nnetsauce's QuantileRegressor produce zero-width prediction intervals when wrapping a DecisionTreeRegressor?","acceptedAnswer":{"@type":"Answer","text":"An unconstrained decision tree or a noiseless Gaussian process can memorize its own training data almost perfectly, driving training residuals to near zero. Because QuantileRegressor optimizes its interval-width multiplier by minimizing pinball loss on data the base model already fit, the optimizer correctly finds that a zero-width interval nearly achieves minimum loss, so it collapses the interval. In testing, DecisionTreeRegressor and ExtraTreeRegressor collapsed on all 12 runs (6 datasets x 2 coverage levels) regardless of scoring strategy, and GaussianProcessRegressor collapsed on 9-10 of 12 runs. Anyone tuning prediction intervals with tree-based or GP models can find pitfalls like this discussed on daily.dev."}},{"@type":"Question","name":"How does nnetsauce's QuantileRegressor scoring strategy compare to PredictionInterval with splitconformal for coverage accuracy?","acceptedAnswer":{"@type":"Answer","text":"PredictionInterval with splitconformal was the best-calibrated method in a benchmark of 38 sklearn regressors, achieving mean coverage of 0.81 at an 80% target and 0.95 at a 95% target, and it never produced a collapsed interval. QuantileRegressor with residuals scoring reached 0.77 and 0.92 respectively, essentially matching or beating sklearn's native linear QuantileRegressor, which scored 0.76 and 0.87. Choosing between conformal and quantile-based interval methods gets easier with benchmarks like this surfaced on daily.dev."}},{"@type":"Question","name":"Which scikit-learn regressors are safe to use with nnetsauce's QuantileRegressor without risking collapsed prediction intervals?","acceptedAnswer":{"@type":"Answer","text":"Thirty-four of 38 tested regressors never collapsed under any QuantileRegressor scoring mode, including the entire linear family (Ridge, Lasso, ElasticNet, BayesianRidge), SVR, NuSVR, LinearSVR, KernelRidge, KNeighborsRegressor, RANSACRegressor, TheilSenRegressor, Bagging­Regressor, and PassiveAggressiveRegressor. The four risky estimators were DecisionTreeRegressor, ExtraTreeRegressor, GaussianProcessRegressor, and occasionally AdaBoostRegressor under conformal scoring modes. Developers picking a base regressor for interval estimation can track findings like this via daily.dev."}}]}
```

