Approximating Functions in a Metric Space

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 98

  • @Zxv975
    @Zxv975 3 ปีที่แล้ว +113

    It's funny, I encountered so many proofs along these lines in my point set topology class and I always found them so dry and hence difficult to follow (or rather, difficult to stay awake long enough to follow them). However, the visuals in this video make it so clear what we're referring to, and the gory details are just there for if you get lost and need some extra structure. Having the visuals as the main proof and the details on the side is delightful, and I really enjoyed this proof. The whole thing seemed borderline obvious, which just goes to show you've done a great job presenting it if your audience is able to guess the conclusion ahead of time.

  •  ปีที่แล้ว

    I love the smooth jazz on the background. Makes the learning experience much better, enjoyable and calmer.

  • @gregpetrics5669
    @gregpetrics5669 3 ปีที่แล้ว +4

    Great video. Thanks! The theoretical value of a subset being compact in a metric space is hugely under appreciated .

  • @brunomartel4639
    @brunomartel4639 3 ปีที่แล้ว +11

    dude this is awesome, keep going!!!

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว +1

      thanks a lot! appreciate the support!

  • @ProbablyTurtles
    @ProbablyTurtles 3 ปีที่แล้ว +5

    That existence proof was great. I needed a refresher for my math course. Thanks for sharing!

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว +6

      Thanks very much! Quick back story, I started my YT channel to animate this exact proof! I drew it all out in one note trying to make sense of what was going on (it was written out in words in the textbook!) and thought hmm that's actually worth sharing!

    • @soccerbels7947
      @soccerbels7947 3 ปีที่แล้ว

      @@DrWillWood wow that's inspiring

  • @mehrdadmohajer3847
    @mehrdadmohajer3847 3 ปีที่แล้ว

    Thx.
    i joined one of the Commentators ( maxwel wilbert) saying : a* is not the good approximation( bc. it is still far away from the point f. if you want to get a good approx. to f, you consider Sub-Space A like a Ballon. As it gets bigger & bigger changes the geometry ( perhaps going from an Appel into a Pear inorder to get as close as possible to f.) At the same time Space B , shrinks toward f , the soulution changes to " minimax " of John v. Newman. Happy to hear more on that from you & the fans.

  • @byronwatkins2565
    @byronwatkins2565 3 ปีที่แล้ว +51

    Infinite series are exact equivalents; only truncated series are approximations.

    • @Evan490BC
      @Evan490BC 3 ปีที่แล้ว +4

      You are right, but his Taylor series was just an example here. That A subset of the function space B can be anything we choose, in general.

    • @stydras3380
      @stydras3380 3 ปีที่แล้ว +6

      There are functions that can't be represented by taylor series.

    • @Your_choise
      @Your_choise 3 ปีที่แล้ว +3

      @@stydras3380 out of curiosity, is there a simple test to test what functions can be modeled by Taylor series

    • @stydras3380
      @stydras3380 3 ปีที่แล้ว +6

      @@Your_choise Well a series that is actually locally taylor expandable (ie every point has a neighborhood where the function is given by a taylor series) must be smooth (all derivatives of any order exist). Is the function infinitely often differentiable? No: Not taylor expandable. Yes: You can thus form the taylor series by virtue of those derivatives and check the radius of convergence. Is the radius positive? No: Oops, taylor doesn't work. Yes: Does the taylor series actually converge to the original function on that point? No: Oops, no Taylor for you. Yes: Great! Taylor worked. For example consider the function f:R->R given by e^(-1/x^2) for x!=0 and 0 for x=0. This function is infinitely often differentiable everywhere (even 0) and the taylor series at 0 exists and converges everywhere. But since all derivatives at x=0 are 0 the taylor series is identicially the 0-function so does NOT agree with f anywhere except x=0!

  • @arsenypogosov7206
    @arsenypogosov7206 ปีที่แล้ว +2

    Function "distance to f" is continuous so by Weierstrass theorem it reaches its infinium on any compact. Q.E.D.

  • @Tutor-e6w
    @Tutor-e6w ปีที่แล้ว +1

    I promise if you keep pushing with this and find ways to take your brilliant explanations and compound them into some final, cool application you will most certainly blow up. You are so lucid in how you articulate things it's hard to put it into words how things just click when you explain them.

  • @geoffrygifari3377
    @geoffrygifari3377 3 ปีที่แล้ว +53

    I'm used to imagining distance between points but distance between *continuous functions* is completely new

    • @Eta_Carinae__
      @Eta_Carinae__ 3 ปีที่แล้ว +10

      It's kinda arbitrary tbh. To get something meaningful, you have to define a norm, so you could have several different d* depending on the norm you use

    • @geoffrygifari3377
      @geoffrygifari3377 3 ปีที่แล้ว +2

      @@Eta_Carinae__ how "near" or "far" two functions from each other depends on the norm? yeah i just never thought you can even define a "distance" between something that's not a point in some space

    • @thanhminhcao3356
      @thanhminhcao3356 3 ปีที่แล้ว +4

      @@geoffrygifari3377 Norn is just a real value function with three properties, and a metric in this case is also a function with three properties. if you have a norm, there is a metric induces from this norm in the sense we can measure distance between two element of the set (now function is an element or "Point"of the set of functions). Its actually not a point in normal sense.

    • @geoffrygifari3377
      @geoffrygifari3377 3 ปีที่แล้ว +2

      @@thanhminhcao3356 ah math.... where one concept can be generalized to something else in no way seemingly related

    • @MrAlRats
      @MrAlRats 3 ปีที่แล้ว

      Check out 'Topology' by James Munkres.

  • @CristianGarcia
    @CristianGarcia 3 ปีที่แล้ว +1

    Enjoyed the video.
    As someone who works in ML, its sad to know there exists a best approximation out there but you are stuck with what your model learned.

  • @hypergraphic
    @hypergraphic 9 หลายเดือนก่อน

    Loving your videos! Keep up the great work

  • @edgarbonet1
    @edgarbonet1 3 ปีที่แล้ว +1

    Also, it would be nice to note that, in this particular case (with the L² norm and A being a vector space), an explicit formula for the best approximation can be derived. It turns out a* is the orthogonal projection of f onto A. It can be computed by projecting f onto an orthogonal basis of A. If the approximation is meant to cover the interval [0, 1], the basis could be the first three shifted Legendre polynomials: 1, 2x−1, and 6x²−6x+1.
    See for instance the articles “Orthogonal polynomials” and “Legendre polynomials” on Wikipedia.

  • @BosonCollider
    @BosonCollider ปีที่แล้ว

    Numerically, A being compact is not enough, it also needs to be *located*, i.e. in addition to upper bounds you need to be able to find a lower approximation of the distance from a point to the set in order to find a good approximation of d*. Then this is closely related to Bishop's lemma in constructive analysis

  • @tat890
    @tat890 3 ปีที่แล้ว +1

    Loving your video Dr. Wood! Great explanations :D

  • @rkalle66
    @rkalle66 ปีที่แล้ว

    In optical applications there are Zernike coefficents describing optical surfaces based on orthogonal polynoms.

  • @rektator
    @rektator 3 ปีที่แล้ว +1

    The set of at most degree 2 polynomials is not compact, but do form a closed convex non-empty subset in a Hilbert space of L^2(X) where X is a bounded subset of the some Euclidean space. Therefore these minimizing elements exist.

    • @MK-13337
      @MK-13337 ปีที่แล้ว

      And due to convexity you have uniqueness too 😁

  • @matveyshishov
    @matveyshishov 2 ปีที่แล้ว +1

    Thank you very much, Will, your videos are so good and easy to understand!!

  • @1Maklak
    @1Maklak 3 ปีที่แล้ว +1

    I think in practical terms, since linear regression minimises the square of distance from data points to approximating function, then a good measure of how good an approximation is would be to integrate the square of difference between a function and its approximation over the finite range we want (a finite Taylor series will shoot out to infinity eventually).

  • @MHamd-qo1yi
    @MHamd-qo1yi 3 ปีที่แล้ว +1

    You made it soo easy to understand 👍

  • @zshahlaie4740
    @zshahlaie4740 ปีที่แล้ว

    you explained this very clearly and perfectly tnx a lottttt

  • @matthewjames7513
    @matthewjames7513 3 ปีที่แล้ว +24

    This is really cool. I'll like the abstract nature of metric space. But how does this help find 'the best approximation' to the function y=e^-x? How could finding a* help in this case?

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว +19

      Thanks! I think the proof that the best approximation a* exists doesn't actually help you find it . In practice, it will depend on the method, and the method will have its own norm (measure of distance). so for example least-squares approximation might have a different a* to minimax approximation (which minimises the maximum distance between the 2 functions). I guess the proof is here to show finding the best approximation is worth doing. In a sense its the supporting theory behind the algorithms! Its useful to compare to eg. differential equations: its great if we can prove a solution exists even if it doesn't help us solve it because at least we're not wasting our time with something which will turn out to have no solutions!

    • @matthewjames7513
      @matthewjames7513 3 ปีที่แล้ว +4

      @@DrWillWood Thanks for your answer :) I find it fascinating that an objective subject like mathematics still seems quite subjective about what algorithm to use to perform the 'best' fit. You could use a least squares, you could also use a nonlinear least squares, or polynomial fit etc etc. The criteria for 'best' seems to change depending on the algorithm.

    • @oscarsmith3942
      @oscarsmith3942 3 ปีที่แล้ว +5

      @@matthewjames7513 That subjectivity is fully captured within your distance function. The reason to use metric spaces here is it means that the theorem works for any definition of "best"

    • @pnachtwey
      @pnachtwey 3 ปีที่แล้ว +1

      If you know your model is in the form of a*e^-(b*x)+c, it is easy to find the coefficients 'a','b', and 'c' by using an "optimizing" or "minimizing" routine such as BFGS, or Levenberg-Marquardt. There are many 'optimizing' methods. Most try to minimize the sum of squared errors over a range.
      If you have only two coefficients to find, 'a' and 'b', then you can think of this as 'a' the north south location and 'b' as the east west location of your first guess at 'a' and 'b' . The sum of squared errors between your data and your model a*e^-(b*x) is the elevation for each point. What you try to do is go down hill to find a lower sum of squared error or elevation. You keep trying to go down hill with each step until you find the elevation or sum of square errors is less the epsilon or you reach a step limit. Eventually you get to the valley or canyon floor if you don't fall into a pit ( local minimum ). If you know there are local minimums then you may need to start 'a' and 'b' at different locations a few times to make sure you find the true minimum. If you have many coefficients then it is as if you are trying to go down hill in multiple dimensions. Learning to minimize errors or optimize is an eye opener.

    • @matthewjames7513
      @matthewjames7513 3 ปีที่แล้ว

      @@pnachtwey Hey! I've actually done an optimizations course before so my eyes have already been opened haha. I never studied it in the context of a metric space before though. Let's say you wanted to find the parameters a,b, and c in your example. I still find it strange that there is no "best" method to extract those parameters. You could use least squares, you could use LM, you could use fmincon() in MATLAB and they'll all give you similar answers - but how can you know which is the best method?

  • @pmcate2
    @pmcate2 ปีที่แล้ว

    Nice visuals. This is just for one norm. I wonder if we can do a similar comparison for every possible norm. Create a metric space of norms and see which one gets us the closest to the function.

  • @miguelandrade4439
    @miguelandrade4439 3 ปีที่แล้ว +3

    Or you could just say that the function a |---> d(a,f) has attains a minimum because A is compact.

  • @prydt
    @prydt 3 ปีที่แล้ว

    these videos are amazing!

  • @Ron_Shvartsman
    @Ron_Shvartsman 3 ปีที่แล้ว +4

    Great video! Quick question: why would this theorem fail if we loosen the restriction on A to simply be closed, rather than compact?

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว +4

      Thanks you! I think any closed and bounded set in a metric space is compact so I think in this case closed and compact are pretty synonymous :-)
      edit: oops I got mixed up here! A compact subset of a metric space is closed and bounded not the other way! To be honest, I don't know if the theorem holds if A is closed but not compact but certainly this proof relies on it.

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว

      @@leirumf5476 thanks! you're right, got mixed up there! I've put in a correction above :-)

    • @lego312
      @lego312 3 ปีที่แล้ว

      Any convex subset of a Banach (complete) metric space can define a perpendicular projection, and thus distance. One needs closure so that the set contains its limit points.

    • @leirumf5476
      @leirumf5476 3 ปีที่แล้ว

      @@DrWillWood o.o sorry, I just see that. I'mma delete my thingy 🙈

  • @thomaszhang4765
    @thomaszhang4765 ปีที่แล้ว

    Do all solutions lie on the boundary?

  • @justdoitlater9507
    @justdoitlater9507 3 ปีที่แล้ว +1

    isn't there a small mistake in your reasoning?
    at 5:30 you talk about a sequence of points a_i in A such that lim i -> ∞ d(a_i,f)=d*.
    then you say that this sequence has a limit point a+, which is not necessarily the case if the sequence has multiple cluster points(which will be in A). you first have to choose one of those points and then take that for a+.
    for example you have the compact set [0,1]U[3,4] in R(euclidian metric). you want to approximate 2 and have the sequence a_n= 1-(1/2)^n for n even , and a_n=3+(1/2)^n for n odd. this sequence doesn`t converge, but lim i -> ∞ d(a_i,2)=1. now you can choose 1 or 3 (the cluster points) and continue with that point for your a+.
    edit: and you have to choose a subsequence that actually goes to your chosen a+)

  • @andrewbetz535
    @andrewbetz535 3 ปีที่แล้ว +1

    What is the significance of two points in A that are both identically close to f while also being the minimum distance?

    • @demr04
      @demr04 3 ปีที่แล้ว

      If two points are both with the same distance, they converge to a better aproximation because A is a compact subset of the metric space B. For the case you describe, you would have to aproximate to a subset C of the subset A you are using, therefore, you don't need to aproximate because the point you want to aproximate is already in the subset A.
      Imagine that the metric space is a rectangle and the subset is any irregular shape "1", logically, for any point outside the irregular shape "1", there exist only one point, which must be in the contour of the shape "1". If there exist a irregular shape "2", subset of the shape "1", there exist many point equally closet to a point in the shape "2" as many of them exist in the inscribed circle of the contour of the shape "2". So one can choose the point in the shape "2" because is subset of the shepa "1".

  • @ilyasamar7611
    @ilyasamar7611 3 ปีที่แล้ว +1

    Thank you so much

  • @tens0r884
    @tens0r884 9 หลายเดือนก่อน

    Maybe I havent done formal math in a while but this proof seems faulty to me. Namely 5:00 is unjustified, you are trying to prove that a* exists but you assume apriori that d* exists. I'm pretty sure the proof is supposed to be as follows: The metric d(x, y) is a continuous function where x, y \in B, therefor d(x, f) is continuous in B, and thus in A. A is compact, thus d restricted to A obtains its minimum (and, maximum) in A.

  • @joshuatanase3718
    @joshuatanase3718 3 ปีที่แล้ว

    Exact thing I want to learn. What are some books that delve deep into this sort of math?

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว

      Yes! This proof is from "approximation theory and methods" by M.J.D. Powell which certainly I would say is a deep delve on the subject! Theres another book "An introduction to the approximation of functions" by T.J. Rivlin which covers similar material but is less thorough.

  • @duongquocthongho2117
    @duongquocthongho2117 3 ปีที่แล้ว

    very nice intuition video, i like it

  • @thatonemailbox
    @thatonemailbox 2 ปีที่แล้ว

    Senior in high school here, about to take the AP Calculus BC exam (comparable to Calc 2). Should someone like me be expected to understand this?

    • @DrWillWood
      @DrWillWood  2 ปีที่แล้ว +1

      I wouldn't expect students to come across this material until late undergraduate level! I studied this proof for my masters degree so don't worry if it feels difficult!

  • @wiggles7976
    @wiggles7976 3 ปีที่แล้ว

    I don't understand why at 5:00 when you let d* be the shortest distance from A to f, that you need to prove anything from there. Don't we already have that d*=min{d(a,f): a \in A} by that assumption, and then whatever d* is you can just say there must exist some a in A such that d(a,f)=d*? If there did not exist a in A such that d(a,f) = d*, then every a in A would be some distance other than d* away from f, and thus d* would not be the minimum. But it is the minimum, so that's a contradiction, and thus there has to exist a in A such that d(a,f)=d*. Is this not sufficient to prove existence?

    • @MK-13337
      @MK-13337 ปีที่แล้ว +1

      Think of the example with the interval (0,1) and the point 2. First of all, the distance between the interval and the number 2 is 1, since |2-1-e| = |1-e| -> 1 when e -> 0 (e here is epsilon not the number e), and we also know that all points in (0,1) are less than one so the distance is at most 1. Thus the distance is 1. This is however never reached by any element in (0,1). For a proof, let's say for x -x=-1 => x=1. But x

    • @wiggles7976
      @wiggles7976 ปีที่แล้ว

      @@MK-13337 That is a simple way to put it, thank you.

  • @maxwibert
    @maxwibert 3 ปีที่แล้ว +1

    I realize this is just nitpicking but I believe your proof doesn't show that a* is THE optimal solution, only that it is AN optimal solution. Uniqueness is a whole other story

  • @General12th
    @General12th 3 ปีที่แล้ว

    Great video! But I can't be the only one who thinks the topic seems awfully abstract. _"Within a space, there exists a point within a subspace that is closest to some other point outside the subspace."_ It's definitely correct, but since those points could represent literally anything, I don't see how this definition is anything but a truism. There exists a best way to approximate one function with another. Is that not already obvious?
    What am I missing?

  • @agustinrodriguezcantalapie581
    @agustinrodriguezcantalapie581 3 ปีที่แล้ว

    Hello, just wondering.
    Does this implies that for non-metric spaces you can’t have a best approximation?
    ps. Great video

    • @juliandominikreusch8979
      @juliandominikreusch8979 3 ปีที่แล้ว +3

      In a space with out a Metric, how would you assess that the approximation is close to the target function in any sense? In the absence of a distance function you can't judge

    • @smolboi9659
      @smolboi9659 3 ปีที่แล้ว

      Not sure but I suspect it might be possible in more general spaces like uniform spaces. They have pseudometrics instead. Since all metrics are pseudometrics, all metric spaces are uniform spaces but not vice versa. Maybe you can find something that works in a uniform space which is not a metric space.
      In general to answer your type of question (can we work with less mathematical structure? ), I look at the hierarchy of mathematical spaces. If you want to generalize results go to more general spaces and see if the proof still holds with the reduced mathematical structure.
      From left to right below the spaces have less and less structure and are more and more general. (e.g All Inner Product Spaces are Normed Vector spaces):
      Inner Product Space, Normed Vector Space, Metric Space, Uniform Space, Cauchy Space, Topological Space, Convergence Space

    • @98danielray
      @98danielray 3 ปีที่แล้ว

      you can probably do more or less analogous things with quasimetrics, but I expect a lot of caveats

    • @98danielray
      @98danielray 3 ปีที่แล้ว

      @@smolboi9659 wouldnt that just be a case of quotienting it out? Id expect the theory would be the same up to quotients

  • @brendawilliams8062
    @brendawilliams8062 3 ปีที่แล้ว

    Thankyou.

  • @thedoublehelix5661
    @thedoublehelix5661 3 ปีที่แล้ว +3

    Closed and bounded isn't the same as compact for a general metric space

    • @DrWillWood
      @DrWillWood  3 ปีที่แล้ว +2

      thanks for pointing that out, I'll put a clarification about this in the description :-)

    • @thedoublehelix5661
      @thedoublehelix5661 3 ปีที่แล้ว +1

      @@DrWillWood it's a great video by the way. Wish my real analysis textbook has visuals like that

    • @MK-13337
      @MK-13337 ปีที่แล้ว

      Closed and bounded are necessary but not sufficient for a general metric space.

  • @hummesse
    @hummesse 3 ปีที่แล้ว

    what a roundabout and unecessary way of not explaining anything. All notation no content.

  • @edgarbonet1
    @edgarbonet1 3 ปีที่แล้ว

    You mention the L₂ norm but, from what I have read, in approximation theory the goal is usually to minimize the worst case error, i.e. the L∞ norm of a−f.

  • @lglgmoreiracom
    @lglgmoreiracom ปีที่แล้ว

    Proof looks a bit unsound to me.