Updated regularization to take theta cell array.