News for hackers. Stuff that matters.
Re:My Python code is a neural network by dontlikeyoueith on Monday July 01, 2024 @08:42PM (#40852439)
The Taylor Series dates to 1715. Fourier Series dates to the 1820s.

Both are universal function approximators and both can be learned via gradient descent.

For the case where the function you want to learn actually is polynomial or periodic (respectively), these are better than neural networks.

Re:My Python code is a neural network by camjw on Tuesday July 02, 2024 @07:22AM (#40855535)
For your interest, Taylor Series are not universal function approximators - the Taylor Series around 0 for

f(x) = e^(-1/x^2) if x != 0 else 0

is identically zero (all partial derivatives are 0 at 0) but the function is clearly not identically zero. So the radius of convergence for this Taylor series is infinite but it only equals the approximated function at one point.

I'm sure there are some conditions you can put on f to make the Taylor Series a UFA but it's been quite a while since I did any real analysis so I have forgotten!

Doesn't detract from the overall point though that there are UFAs that are not neural nets. I should say that I don't know what the precise definition of a UFA really is, but I assume you have to have more than equality at one point.

Re:My Python code is a neural network by Horffupolde on Tuesday July 02, 2024 @08:17AM (#40855891)
Taylor series work on differentiable intervals. You specifically chose a function and interval where this is not true. Of course it will not be a good approximation.
Re:My Python code is a neural network by dontlikeyoueith on Tuesday July 02, 2024 @02:02PM (#40858999)
I'm pretty sure the UFA theorems for neural networks wouldn't apply to that function either: https://en.wikipedia.org/wiki/Universal_approximation_theore...

Generally, they assume the function to be approximated is continuous.