Performs batched prediction on combined data to manage memory usage. Supports both classification (probability predictions) and regression.
sage_batch_predict(learner, combined_data, task, batch_size, task_type)For classification: matrix of class probabilities (n_rows x n_classes).
For regression: numeric vector of predictions (length n_rows).
(Learner) Trained mlr3 learner.
(data.table) Data with feature columns to predict on.
(Task) mlr3 task object.
(integer(1) or NULL) Batch size for predictions. If NULL or if
total_rows <= batch_size, processes all data at once.
(character(1)) Task type, either "classif" or "regr".