himalaya.kernel_ridge.predict_weighted_kernel_ridge

himalaya.kernel_ridge.predict_weighted_kernel_ridge(Ks, dual_weights, deltas, split=False, n_targets_batch=None, progress_bar=False)[source]

Compute predictions, typically on a test set.

Parameters
Ksarray of shape (n_kernels, n_samples_test, n_samples_train)

Test kernels.

dual_weightsarray of shape (n_samples_train, n_targets)

Dual weights of the kernel ridge model.

deltasarray of shape (n_kernels, n_targets) or (n_kernels, )

Log kernel weights for each target.

splitbool

If True, the predictions is split across kernels.

n_targets_batchint or None

Size of the batch for computing predictions. Used for memory reasons. If None, uses all n_targets at once.

progress_barbool

If True, display a progress bar over batches and iterations.

Returns
Y_hatarray of shape (n_samples_test, n_targets) or (n_kernels, n_samples_test, n_targets) (if split is True)

Predicted values.