forestci
Confidence intervals for scikit-learn forest algorithms
Decision gist · record as of 2026-08-14
Yes. Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and a focused role in an underserved niche (uncertainty quantification for scikit-learn forests). Install if you need confidence intervals on random forest predictions; skip if you use other ensemble libraries or don't require uncertainty estimates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires scikit-learn 1.0 through 1.9 and Python 3.10 or later; best results with a large number of trees in the forest model.
- Low friction: pure Python wheel with three standard scientific dependencies (numpy, scikit-learn, scipy).
- Actively maintained with last commit 2026-07-29.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
last release 2026-07-25 (20 days) · last repo commit 2026-07-29 · 288 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 128,512 downloads/mo, #11,704 on PyPI
Alternatives
Verify before relying
pip install forestci
import forestci as fci
ci = fci.random_forest_error(
forest=model,
X_train_shape=X_train.shape,
X_test=X,
calibrate=True
)- Whether calibration routine convergence issues occur frequently in practice or only under specific model configurations.
- Performance characteristics when applied to very large forests or high-dimensional datasets.
What it is and what it does
forestci extends scikit-learn's random forest objects by adding uncertainty quantification—computing in-bag error estimates and confidence intervals around predictions. It wraps fitted forest models and calculates how much prediction variability stems from the training set composition, helping you understand how reliable individual predictions are.
The package is built on algorithms from Stefan Wager's R implementation and works with scikit-learn 1.0 through 1.9. It requires a large number of trees for reliable intervals; an optional calibration routine attempts to extrapolate results for infinite trees but can be unstable, so the description recommends disabling it with calibrate=False and increasing tree count if numerical errors occur.
Use it for
- Quantify prediction uncertainty in random forest regression to report confidence bands alongside point estimates.
- Assess classification model confidence by computing error bars for predicted probabilities.
- Diagnose training set sensitivity by examining how much predictions vary with different subsamples.
- Validate model stability before deployment by checking whether confidence intervals narrow as tree count increases.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and a focused role in an underserved niche (uncertainty quantification for scikit-learn forests). Install if you need confidence intervals on random forest predictions; skip if you use other ensemble libraries or don't require uncertainty estimates.
Install
forestci on PyPI
Before you install
Low friction: pure Python wheel with three standard scientific dependencies (numpy, scikit-learn, scipy). Actively maintained with last commit 2026-07-29.
Requires scikit-learn 1.0 through 1.9 and Python 3.10 or later; best results with a large number of trees in the forest model.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with minimal obligations.
Quickstart
pip install forestci
import forestci as fci
ci = fci.random_forest_error(
forest=model,
X_train_shape=X_train.shape,
X_test=X,
calibrate=True
)
Verify before relying
- Whether calibration routine convergence issues occur frequently in practice or only under specific model configurations.
- Performance characteristics when applied to very large forests or high-dimensional datasets.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesnumpyscikit-learnscipy |
| Maintenance | Actively maintained 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 128,512 / month, #11,704 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/Engineering |
Evidence: forestci-0.8-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “random forest confidence intervals”
- forestciComputes confidence intervals and variance estimates for scikit-learn…
- ydfYDF trains, evaluates, and interprets decision forest models (Random…
- tensorflow-decision-forestsTrains and deploys decision forest models (Random Forests, Gradient…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also MAPIE · quantile-forest · treeinterpreter · bootstrapped · betacal · Boruta · ngboost · tensorflow-decision-forests · missingpy · scikit-learn-extra