Skip to content

AutoTabPFNRegressor

Bases: BaseEstimator, RegressorMixin

Automatic Post Hoc Ensemble Regressor for TabPFN models. Attributes: predictor_ : AutoPostHocEnsemblePredictor The predictor interface used to make predictions, see post_hoc_ensembles.pfn_phe.AutoPostHocEnsemblePredictor for more. phe_init_args_ : dict The optional initialization arguments used for the post hoc ensemble predictor.

__init__

__init__(
    max_time: int | None = 30,
    preset: Literal[
        "default", "custom_hps", "avoid_overfitting"
    ] = "default",
    ges_scoring_string: str = "mse",
    device: Literal["cpu", "cuda"] = "cpu",
    random_state: int | None | RandomState = None,
    categorical_feature_indices: list[int] | None = None,
    phe_init_args: dict | None = None,
)

Parameters:

Name Type Description Default
max_time

int | None, default=None The maximum time to spend on fitting the post hoc ensemble.

30
preset Literal['default', 'custom_hps', 'avoid_overfitting']

{"default", "custom_hps", "avoid_overfitting"}, default="default" The preset to use for the post hoc ensemble.

'default'
ges_scoring_string

str, default="mse" The scoring string to use for the greedy ensemble search. Allowed values are: {"rmse", "mse", "mae"}.

'mse'
device

{"cpu", "cuda"}, default="cuda" The device to use for training and prediction.

'cpu'
random_state

int, RandomState instance or None, default=None Controls both the randomness base models and the post hoc ensembling method.

None
categorical_feature_indices list[int] | None

list[int] or None, default=None The indices of the categorical features in the input data. Can also be passed to fit().

None
phe_init_args

dict | None, default=None The initialization arguments for the post hoc ensemble predictor. See post_hoc_ensembles.pfn_phe.AutoPostHocEnsemblePredictor for more options and all details.

None

fit

fit(
    X,
    y,
    categorical_feature_indices: list[int] | None = None,
)

predict

predict(X)