coverforest: Conformal Predictions with Random Forest in Python

Panisara Meehinkong, Donlapark Ponnoprat
1/24/2025
stat.MLcs.LGstat.CO

Official code: donlap/coverforest (1 star, BSD-3-Clause, last commit 2026-03-31). 1 more implementation below.

Abstract

Conformal prediction provides a framework for uncertainty quantification, specifically in the forms of prediction intervals and sets with distribution-free guaranteed coverage. While recent cross-conformal techniques such as CV+ and Jackknife+-after-bootstrap achieve better data efficiency than traditional split conformal methods, they incur substantial computational costs due to required pairwise comparisons between training and test samples' out-of-bag scores. Observing that these methods naturally extend from ensemble models, particularly random forests, we leverage existing optimized random forest implementations to enable efficient cross-conformal predictions. We present coverforest, a Python package that implements efficient conformal prediction methods specifically optimized for random forests. coverforest supports both regression and classification tasks through various conformal prediction methods, including split conformal, CV+, Jackknife+-after-bootstrap, and adaptive prediction sets. Our package leverages parallel computing and Cython optimizations to speed up out-of-bag calculations. Our experiments demonstrate that coverforest's predictions achieve the desired level of coverage. In addition, its training and prediction times can be faster than an existing implementation by 2--9 times. The source code for the coverforest is hosted on GitHub at https://github.com/donlap/coverforest.

View on arXivView PDF

Code Implementations(2)

donlap/coverforestOfficial100%
BSD-3-Clause

A simple and fast sklearn-compatible conformal predictions with random forests for both classification and regression tasks.

10Cython, PythonNov 5, 20256 months agoBSD-3-Clause
BSD-3-Clause

A simple and fast sklearn-compatible conformal predictions with random forests for both classification and regression tasks.

466Cython, PythonJan 12, 20256 months agoBSD-3-Clause
classificationconformal-predictionpythonrandom-forestregression+1 more

Similar Papers

Cite this paper

@article{meehinkong2025coverforest,
  title  = {coverforest: Conformal Predictions with Random Forest in Python},
  author = {Panisara Meehinkong and Donlapark Ponnoprat},
  year   = {2025},
  eprint = {2501.14570},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.14570v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.14570.svg)](https://codeofpaper.com/paper/2501.14570)

Discussion