regressor ¶
TabPFNRegressor class.
Example
TabPFNRegressor ¶
Bases: RegressorMixin
, BaseEstimator
TabPFNRegressor class.
bardist_
instance-attribute
¶
bardist_: FullSupportBarDistribution
The bar distribution of the target variable, used by the model.
config_
instance-attribute
¶
config_: InferenceConfig
The configuration of the loaded model to be used for inference.
executor_
instance-attribute
¶
executor_: InferenceEngine
The inference engine used to make predictions.
feature_names_in_
instance-attribute
¶
The feature names of the input data.
May not be set if the input data does not have feature names, such as with a numpy array.
forced_inference_dtype_
instance-attribute
¶
The forced inference dtype for the model based on inference_precision
.
inferred_categorical_indices_
instance-attribute
¶
The indices of the columns that were inferred to be categorical, as a product of any features deemed categorical by the user and what would work best for the model.
interface_config_
instance-attribute
¶
interface_config_: ModelInterfaceConfig
Additional configuration of the interface for expert users.
n_features_in_
instance-attribute
¶
The number of features in the input data used during fit()
.
n_outputs_
instance-attribute
¶
The number of outputs the model supports. Only 1 for now
preprocessor_
instance-attribute
¶
The column transformer used to preprocess the input data to be numeric.
renormalized_criterion_
instance-attribute
¶
renormalized_criterion_: FullSupportBarDistribution
The normalized bar distribution used for computing the predictions.
y_train_mean_
instance-attribute
¶
The mean of the target variable during training.
y_train_std
instance-attribute
¶
The standard deviation of the target variable during training.
fit ¶
Fit the model.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
XType
|
The input data. |
required |
y |
YType
|
The target variable. |
required |
Returns:
Type | Description |
---|---|
Self
|
self |
predict ¶
predict(
X: XType,
*,
output_type: Literal[
"mean",
"median",
"mode",
"quantiles",
"full",
"main",
] = "mean",
quantiles: list[float] | None = None
) -> (
ndarray
| list[ndarray]
| dict[str, ndarray]
| dict[str, ndarray | FullSupportBarDistribution]
)
Predict the target variable.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
X |
XType
|
The input data. |
required |
output_type |
Literal['mean', 'median', 'mode', 'quantiles', 'full', 'main']
|
Determines the type of output to return.
|
'mean'
|
quantiles |
list[float] | None
|
The quantiles to return if By default, the |
None
|
Returns:
Type | Description |
---|---|
ndarray | list[ndarray] | dict[str, ndarray] | dict[str, ndarray | FullSupportBarDistribution]
|
The predicted target variable or a list of predictions per quantile. |