C1_W2_Lab04_FeatEng_PolyReg_Soln: gradient treats polynomial features are independent variables

In C1_W2_Lab04_FeatEng_PolyReg_Soln It looks like it’s merely adding the polynomial features as independent variables in the gradient calculation. Shouldn’t the gradient take into account that those are not independent variables?

They’re new features created as non-linear combinations of the original features. We don’t really care whether they’re independent - that’s not a requirement.

Thanks for your answer. My mistake was thinking that the cost function was being minimized on the features, not on w and b.