Hi, possibly naive question. We are taking the derivative of a function to find “which direction to go”. But to me it seem that it is often the case in real world problems that we have a huge number of measurements, but we do not know the exact functions that produce them? If we do not know the function(s), how can we calculate their (partial) derivatives?
Well, the course quickly answered that.
As the lab I just started explains - “You can use the function np.polyfit(x, y, deg)
to fit a polynomial of degree deg
to points (𝑥,𝑦), minimising the sum of squared errors.”
https://numpy.org/doc/stable/reference/generated/numpy.polyfit.html
And it seems the algorithms for finding these are very similar to what we have explored in the course, i.e regression, now that I know what to search for.
Edit: Hmm, the math is a bit above my head, but if these curve fitting algorithms are similar, do THEY use derivatives, and if so how do they find them?