Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A package for statistically rigorous scientific discovery using machine learning. Implements prediction-powered inference.
| Date | Stars |
|---|---|
| 2026-07-31 | 295 |
| 2026-08-02 | 296 |
| 2026-08-06 | 296 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<p align="center">
<img src="./assets/ppi.svg?maxAge=2592000"/>
</p>
<p align="center">
<a style="text-decoration:none !important;" href="https://arxiv.org/abs/2301.09633" alt="arXiv"><img src="https://img.shields.io/badge/paper-arXiv-red" /></a>
<a style="text-decoration:none !important;" href="https://pypi.org/project/ppi-python/" alt="package management"> <img src="https://img.shields.io/badge/pip-package-blue" /></a>
<a style="text-decoration:none !important;" href="https://ppi-py.readthedocs.io/en/latest/" alt="documentation"> <img src="https://img.shields.io/badge/API-docs-34B167" /></a>
<a style="text-decoration:none !important;" href="https://opensource.org/licenses/MIT" alt="License"><img src="https://img.shields.io/badge/license-MIT-750014" /></a>
</p>
Prediction-powered inference (PPI) is a framework for statistically rigorous scientific discovery using machine learning.
Given a small amount of data with gold-standard labels and a large amount of unlabeled data, prediction-powered inference allows for the estimation of population parameters, such as the mean outcome, median outcome, linear and logistic regression coefficients.
Prediction-powered inference can be used both to produce better point estimates of these quantities as well as tighter confidence intervals and more powerful p-values.
The methods work both in the i.i.d. setting and for certain classes of distribution shifts.
**See the API documentation [here](https://ppi-py.readthedocs.io/en/latest/) and the original paper [here](https://arxiv.org/abs/2301.09633).**
This package is actively maintained, and contributions from the community are welcome.
# Getting Started
In order to install the package, run
```python
pip install ppi-python
```
This will build and install the most recent version of the package.
## Warmup: estimating the mean
To test your installation, you can try running the prediction-powered mean estimation algorithm on the ```galaxies``` dataset.
The gold-standard labels and model predictions from the dataset will be downloaded into a folder called `./data/`.
The labels, $Y$, are binary indicators of whether or not the galaxy is a spiral galaxy.
The model predictions, $\hat{Y}$, are the model's estimated probability of whether the galaxy image has spiral arms.
The inference target is $\theta^* = \mathbb{E}[Y]$, the fraction of spiral galaxies.
You will produce a confidence interval, $\mathcal{C}^{\mathrm{PP}}_\alpha$, which contains $\theta^*$ with probability $1-\alpha=0.9$, i.e.,
```math
\mathbb{P}\left( \theta^* \in \mathcal{C}^{\mathrm{PP}}_\alpha\right) \geq 0.9.
```
The code for this is below. It can be copy-pasted directly into the Python REPL.
```python
# Imports
import numpy as np
from ppi_py import ppi_mean_ci
from ppi_py.datasets import load_dataset
np.random.seed(0) # For reproducibility's sake
# Download and load dataset
data = load_dataset('./data/', "galaxies")
Y_total = data["Y"]; Yhat_total = data["Yhat"]
# Set up the inference problem
alpha = 0.1 # Error rate
n = 1000 # Number of labeled data points
rand_idx = np.random.permutation(Y_total.shape[0])
Yhat = Yhat_total[rand_idx[:n]]
Y = Y_total[rand_idx[:n]]
Yhat_unlabeled = Yhat_total[n:]
# Produce the prediction-powered confidence interval
ppi_ci = ppi_mean_ci(Y, Yhat, Yhat_unlabeled, alpha=alpha)
# Print the results
print(f"theta={Y_total.mean():.3f}, CPP={ppi_ci}")
```
The expected results look as below $^*$:
```
theta=0.259, CPP=(0.2322466630315982, 0.2626038799812829)
```
($^*$ these results were produced with ```numpy=1.26.1```, and may differ slightly due to randomness in other environments.)
If you have reached this stage, congratulations! You have constructed a prediction-powered confidence interval.
See [the documentation](https://ppi-py.readthedocs.io/en/latest/) for more usages of prediction-powered inference.
# Examples
The package somes with a suite of examples on real data:
- Proteomic Analysis with AlphaFold ([```alphafoldExcerpt of 10,744 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:0d2086011dd27075, topic:inference