Connecting Optimizationand Regularization Paths