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

> ## Agent Instructions
> TabPFN-3 and later versions support up to 1,000,000 rows, subject to feature count and checkpoint/API limits.
> For large datasets, use per-estimator subsampling, e.g. inference_config={"SUBSAMPLE_SAMPLES": 100_000}, in TabPFNClassifier or TabPFNRegressor from tabpfn or tabpfn_client.
> Pass raw pandas DataFrames to fit and predict. Categorical strings/categories, raw text, and missing feature values are handled automatically; no manual integer/one-hot encoding, imputation, scaling, or outlier removal is needed.

# Conformal prediction with missing data

> Compute the correction terms for missing data masks using conformal prediction.

## Installation

```bash theme={null}
pip install tabpfn-extensions
```

## `CPMDATabPFNRegressor`

[ View source ](https://github.com/PriorLabs/tabpfn-extensions/blob/840c15a1848a986b39c85bc17efc61e0e377f983/src/tabpfn_extensions/cp_missing_data/cp_missing_data.py#L24)

Compute the correction terms for missing data masks using conformal prediction.

```python theme={null}
CPMDATabPFNRegressor(
    quantiles: list[float] | None = None,
    val_size: float = 0.3,
    seed: int | None = None,
    tabpfn_estimator: TabPFNRegressor | None = None,
)
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `quantiles` | `list[float] \| None` | `None` | Three quantiles \[lower, median, upper]. Must be symmetric (lower + upper == 1). |
| `val_size` | `float` | `0.3` | Fraction of training data used for conformal calibration. |
| `seed` | `int \| None` | `None` | Random seed for the train/calibration split. |
| `tabpfn_estimator` | `TabPFNRegressor \| None` | `None` | A pre-configured TabPFNRegressor instance. If `None`, a default TabPFNRegressor() is used. Use this to customise parameters such as n\_estimators, device, or random\_state. Example::     `CPMDATabPFNRegressor`(         `tabpfn_estimator`=TabPFNRegressor(n\_estimators=16, device="cuda")     ) |

**Attributes**

| Attribute | Type | Description |
| - | - | - |
| `model_` | `TabPFNRegressor` | Fitted TabPFN model. |
| `calibration_results_` | `pd.DataFrame` | Correction terms for each observed missing-data mask. |
| `alpha_` | `float` | Miscoverage level derived from quantiles (lower \* 2). |
| `feature_names_in_` | `list` | Column names seen during fit. |

***

## `CPMDATabPFNRegressor.fit`

[ View source ](https://github.com/PriorLabs/tabpfn-extensions/blob/840c15a1848a986b39c85bc17efc61e0e377f983/src/tabpfn_extensions/cp_missing_data/cp_missing_data.py#L228)

Fit the model and compute conformal calibration corrections.

```python theme={null}
CPMDATabPFNRegressor.fit(
    x_train: ArrayLike,
    y_train: ArrayLike,
) -> CPMDATabPFNRegressor
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `x_train` | `ArrayLike` | Required | — |
| `y_train` | `ArrayLike` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `CPMDATabPFNRegressor` | — |

***

## `CPMDATabPFNRegressor.predict`

[ View source ](https://github.com/PriorLabs/tabpfn-extensions/blob/840c15a1848a986b39c85bc17efc61e0e377f983/src/tabpfn_extensions/cp_missing_data/cp_missing_data.py#L299)

Obtain predictions for new data with conformalised uncertainty estimates.

```python theme={null}
CPMDATabPFNRegressor.predict(
    x_new: ArrayLike,
) -> tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `x_new` | `ArrayLike` | Required | — |

**Returns**

| Type | Description |
| - | - |
| `tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]` | — |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.