Is there an order to optimizing the degree of polynomial and tuning regularization

In the final lab for the week, we first optimized the degree of polynomial that minimized CV error and then we went through to tuning the regularization term.

Is it just coincidence that one is shown after the other and the latter being called a “tuning” step or is that the order we should go by. If not, then what is the recommendation to optimize these two?

I saw this related post Can we use ternary search to find the optimal value for the polynomial degree and the regularization parameter? - MLS Course 2 / MLS Course 2 Week 3 - DeepLearning.AI

Regulariztion is a standard technique for controlling overfitting.

Adding polynomial terms is also a standard technique for creating a more complex model.

The topics fit together well.

Thanks @TMosh and I do understand the purpose of each from the class. What I’m asking is if there is an order to how we optimally pick these parameters as both were being picked as tuning steps in the lab.

Both at once. Typically you’re going to evaluate them in pairs, and select the pair that gives the best performance for your particular task.