ridge_update function

Updates ridge regression matrices.