- Uses
scikit-learntree splits, but fits TabPFN models at each node or leaf. - Optionally prunes or refits nodes using validation-based performance checks.
- Works with the typical parameters for tree-based methods.
Getting Started
To install the extension, include therf_pfn extra:
Random Forest
Train a Random Forest where each tree uses TabPFN models at its leaves for adaptive predictions viaRandomForestTabPFNRegressor and RandomForestTabPFNClassifier.
Decision Trees
Train standalone Decision Trees that delegate predictions at each leaf (or node) to TabPFN withDecisionTreeTabPFNRegressor and DecisionTreeTabPFNClassifier.
Core Parameters
The following table lists the core parameters. For more details see the rf_pfn extension on GitHub.Random Forest
| Param | Meaning (per code) | Default |
|---|---|---|
tabpfn | Required TabPFN model | - |
max_depth | Tree depth (per base DT) | cls: 5, reg: 5 |
bootstrap | Bootstrap samples when fitting trees | True |
rf_average_logits | Classifier: average logits across trees | cls: True, reg: False |
dt_average_logits | Classifier: average logits within trees | True |
max_predict_time | Stop averaging once time exceeded (seconds) | cls: 60, reg: -1 |
min_samples_split | Split threshold per DT | cls: 1000, reg: 300 |
min_samples_leaf | Min samples per leaf | 5 |
max_features | Features considered at split | "sqrt" |
fit_nodes | Fit TabPFN at internal nodes | True |
Decision Trees
| Param | Meaning (per code) | Default |
|---|---|---|
tabpfn | Required TabPFN model | - |
max_depth | Max depth | None (unlimited) |
min_samples_split | Split threshold per DT | 1000 |
min_samples_leaf | Min samples per leaf | 1 |
max_features | Features considered at split | None (all features) |
fit_nodes | Fit TabPFN at internal nodes | True |