> ## 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.

# Partial dependence

> Plot partial dependence and individual conditional expectation for TabPFN.

> [!NOTE]
>
> Looking for usage documentation? Check out [Interpretability](https://docs.priorlabs.ai/capabilities/interpretability.md).

## `pdp.partial_dependence_plots`

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

Plot partial dependence (and ICE) for 1D/2D feature(s).

```python theme={null}
pdp.partial_dependence_plots(
    estimator: BaseEstimator,
    X: np.ndarray,
    features: Sequence[int | tuple[int, int]],
    *,
    grid_resolution: int = 20,
    kind: str = "average",
    target_class: int | None = None,
    ax: Axes | None = None,
    **kwargs,
) -> PartialDependenceDisplay
```

**Parameters**

| Parameter | Type | Default | Description |
| - | - | - | - |
| `estimator` | `BaseEstimator` | Required | fitted estimator or TabPFN-like estimator (fit-at-predict-time is fine) |
| `X` | `np.ndarray` | Required | array of shape `(n_samples, n_features)` |
| `features` | `Sequence[int \| tuple[int, int]]` | Required | list of feature indices (e.g., `[0, 3]`) or pairs for interactions (e.g., `[(0, 3)]`) |
| `grid_resolution` | `int` | `20` | number of grid points per feature |
| `kind` | `str` | `"average"` | `"average"` for PD, `"individual"` for ICE, `"both"` in newer sklearn |
| `target_class` | `int \| None` | `None` | for classifiers, the class index for which to plot probabilities |
| `ax` | `Axes \| None` | `None` | optional matplotlib [`Axes`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.html) |
| `**kwargs` | — | — | forwarded to [`PartialDependenceDisplay.from_estimator`](https://scikit-learn.org/stable/modules/generated/sklearn.inspection.PartialDependenceDisplay.html#sklearn.inspection.PartialDependenceDisplay.from_estimator) |

**Returns**

| Type | Description |
| - | - |
| `PartialDependenceDisplay` | Display containing the computed partial dependence results and plot artists. |


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