deferred_fit_predict
deferred_fit_predict(
expr,
target,
features,
cls,
return_type,
params=(),
name_infix='predict',
cache=None,
)Create a deferred fit and predict operation on an expression.
This function creates a DeferredFitOther object that can fit a model on training data and then make predictions on new data, all within a deferred execution context.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| expr | Expr | The input expression (table) to fit and predict on. | required |
| target | str | Target column name for supervised learning. | required |
| features | tuple | Column names or indices to use as features. | required |
| cls | type | Scikit-learn estimator class to fit. | required |
| return_type | DataType | The data type of the predictions. | required |
| params | tuple | Optional parameters to pass to the estimator constructor. | () |
| name_infix | str | Infix to use in generated function names. | 'predict' |
| cache | Cache | None | Optional cache configuration for the fitted model. | None |
Returns
| Name | Type | Description |
|---|---|---|
| DeferredFitOther | A deferred fit/predict object that can be executed later. |