himalaya.kernel_ridge.primal_weights_kernel_ridge

himalaya.kernel_ridge.primal_weights_kernel_ridge(dual_weights, X_fit)[source]

Compute the primal weights for kernel ridge regression.

Parameters
dual_weightsarray of shape (n_samples_fit, n_targets)

Dual coefficient of the kernel ridge regression.

X_fitarray of shape (n_samples_fit, n_features)

Training features.

Returns
primal_weightsarray of shape (n_features, n_targets)

Primal coefficients of the equivalent ridge regression. The coefficients are computed on CPU memory, since they can be large.