how to calculate the ridge parameter k in the ridge regression?