Latest / Book Shelter / Least Squares Data Fitting with Applications
Transcript
- 0:00Speaker 1: Imagine you're staring at a screen filled with just well jumbled,
- 0:05Speaker 1: incomplete data. Maybe you're a doctor trying to piece together
- 0:08Speaker 1: a clear image an organ image from really fuzzy scams.
- 0:12Speaker 2: Or maybe a scientist tracking a satellite with patchy signals.
- 0:15Speaker 1: You know, exactly, how do you our listener find that
- 0:19Speaker 1: clear signal in all that noise? How do you make
- 0:22Speaker 1: sense of the chaos and actually extract something useful.
- 0:25Speaker 2: It's such a fundamental challenge really in almost every data
- 0:28Speaker 2: driven field you can think of, and at its heart
- 0:31Speaker 2: there's this remarkably powerful mathematical idea, the least squares problem.
- 0:37Speaker 2: So today we're taking a deep dive into its fascinating history.
- 0:41Speaker 2: It's ingenious solutions, and it's just astonishing reach across modern
- 0:47Speaker 2: science and technology.
- 0:48Speaker 1: That's right. Your mission, should you choose to accept it,
- 0:51Speaker 1: in this deep dive, is to get a fast, crystal
- 0:53Speaker 1: clear understanding of how we fit models to data, how
- 0:56Speaker 1: we estimate unknown parameters, and really how we extract meaning
- 1:00Speaker 1: from noisy observations, and will trace.
- 1:01Speaker 2: His journey right from like a humble nineteenth century surveying
- 1:06Speaker 2: tool may back all the way to the backbone of
- 1:08Speaker 2: modern AI medical imaging even climate science.
- 1:12Speaker 1: And our guide for this whole journey is this comprehensive
- 1:15Speaker 1: book lease squares data fitting with applications, which gives us
- 1:18Speaker 1: some incredible insights into this well incredibly versatile method.
- 1:22Speaker 2: So let's begin our story not in some futuristic lab
- 1:26Speaker 2: but maybe under the stars or across landscapes being mapped out.
- 1:31Speaker 1: Indeed, our sources tell us the concept lease squares was
- 1:35Speaker 1: invented and used by the legendary mathematician Carl Friedrich goss
- 1:39Speaker 1: Kills right in his surveying activities centuries ago. He was
- 1:43Speaker 1: trying to find the best possible fit for his astronomical
- 1:46Speaker 1: observations maybe.
- 1:47Speaker 2: Yeah, or accurately map land from measurements that were, let's
- 1:51Speaker 2: face it, probably imperfect.
- 1:53Speaker 1: Think of it like connecting the dots on a scattered picture,
- 1:55Speaker 1: trying to find the underlying line that truly represents them.
- 1:58Speaker 2: And for a long time it was powerful, sure, but
- 2:01Speaker 2: often a manual tool. Then fast forward in nineteen sixty.
- 2:05Speaker 1: Five computer age, exactly.
- 2:07Speaker 2: The rise of computers, and this is where gh Gullub
- 2:10Speaker 2: enters the picture. His groundbreaking work, particularly on QR factorization
- 2:15Speaker 2: and a stable algorithm for singular value decomposition SVD SVD.
- 2:21Speaker 1: Okay, we'll hear more about that.
- 2:22Speaker 2: I bet oh yes, that really sparked a renewed interest
- 2:25Speaker 2: in least squares. These computational breakthroughs made it practical, highly practical,
- 2:30Speaker 2: even to solve these problems on a scale you just
- 2:32Speaker 2: couldn't imagine before.
- 2:33Speaker 1: Right, it unlocked its potential totally. And here's where it
- 2:37Speaker 1: gets really interesting. I think one of the book's core
- 2:40Speaker 1: aims is to bridge the communication.
- 2:43Speaker 2: Gap ah yes, between statistics and numerical analysis.
- 2:46Speaker 1: Two fields that often used totally different words for the
- 2:49Speaker 1: exact same concept.
- 2:50Speaker 2: Precisely, so, what a numerical analyst might call an L
- 2:54Speaker 2: two approximation.
- 2:55Speaker 1: Statistician might call.
- 2:57Speaker 2: Regression analysis or parameter estimation, or you terms like regularization, filtering,
- 3:02Speaker 2: process identification, they all point to variations of this same
- 3:06Speaker 2: core idea finding the best fit to data.
- 3:09Speaker 1: Understanding those connections, then, is pretty crucial to seeing the
- 3:13Speaker 1: full power here. Absolutely, So what is that core idea?
- 3:16Speaker 1: Let's nail it down. Imagine you're given a set of
- 3:19Speaker 1: data points like T one y one, T two, y
- 3:22Speaker 1: two up to tm YM your raw measurements, your raw
- 3:26Speaker 1: real world measurements. But here's the kicker they're not perfect.
- 3:30Speaker 1: They're noisy measurements of some underlying ideal pure data function.
- 3:35Speaker 2: Right, and that noise comes in as data errors, Essentially,
- 3:40Speaker 2: random variations are maybe inaccuracies from your measuring device. Okay,
- 3:43Speaker 2: So our goal isn't to perfectly capture that noise. The
- 3:46Speaker 2: noise isn't the truth we're.
- 3:48Speaker 1: After, right, you want the signal exactly.
- 3:50Speaker 2: Instead, we want to compute an approximation to that pure
- 3:53Speaker 2: data function using what the book calls a fitting model.
- 3:56Speaker 1: Okay, a model.
- 3:57Speaker 2: And this model has a few unknown parameters let's call
- 4:00Speaker 2: them X, that we need to figure out from our
- 4:02Speaker 2: noisy observation.
- 4:03Speaker 1: And these models they come in two main flavors, right,
- 4:06Speaker 1: linear and nonlinear.
- 4:07Speaker 2: That's right. The simplest is the linear model. The parameters
- 4:10Speaker 2: x appear in a straightforward linear way, fitting a straight
- 4:14Speaker 2: line to data.
- 4:15Speaker 1: Simple enough.
- 4:16Speaker 2: But then there's the much harder non linear model. That's
- 4:19Speaker 2: where those parameters x appear in a more complex nonlinear.
- 4:22Speaker 1: Fashion, like inside an exponent or something exactly.
- 4:25Speaker 2: A classic example is a Gaussian function that bell shaped curve.
- 4:29Speaker 2: If your parameters are determining the center or the width
- 4:31Speaker 2: of that bell like by two and by three, and
- 4:34Speaker 2: by one e t by two two two by thirty two.
- 4:37Speaker 2: It gets much strickier.
- 4:38Speaker 1: Right, finding the best fit there sounds like navigating a
- 4:41Speaker 1: tricky landscape.
- 4:43Speaker 2: It really is like trying to find the lowest valley
- 4:45Speaker 2: when there are lots of little dips and hills hiding it.
- 4:47Speaker 1: Okay, so how do we actually find that best fit?
- 4:51Speaker 1: What's the mechanism?
- 4:52Speaker 2: The biggest clue lies in something called.
- 4:54Speaker 1: The residuals residuals.
- 4:55Speaker 2: There's simply the difference between your actual measurement ye and
- 4:59Speaker 2: what your model p that measurement should be mx T,
- 5:02Speaker 2: So the leftover bit the leftover bet, and the book
- 5:04Speaker 2: emphasizes h residual contains a mix of the original data
- 5:08Speaker 2: error e from your measurement and an approximation error because
- 5:13Speaker 2: your model probably isn't the perfect pure data function.
- 5:16Speaker 1: Itself got it so error plus how far off the model.
- 5:19Speaker 2: Is exactly and the least squares principle is elegantly simple.
- 5:25Speaker 2: Our mission is to find the parameters x that make
- 5:29Speaker 2: the sum of squared residuals as small as possible, minimize
- 5:32Speaker 2: those discrepancies.
- 5:33Speaker 1: Minimize the sum of squares. But why squares? Why not?
- 5:36Speaker 1: Just like the absolute differences.
- 5:38Speaker 2: Ah, good question. The statistical justification is actually quite profound.
- 5:43Speaker 2: It comes from the maximum likelihood principle. Okay, if your
- 5:46Speaker 2: data errors are unbiased, uncorrelated, and follow that nice bell
- 5:51Speaker 2: shaped Gaussian distribution what we often.
- 5:53Speaker 1: Call white noise, like pure random noise, pure.
- 5:56Speaker 2: Random noise, then minimizing the sun of squared residuals gives
- 6:00Speaker 2: you the maximum likelihood estimator. It's the most probable set
- 6:03Speaker 2: of parameters given your noisy data.
- 6:05Speaker 1: So it's statistically the best bet under those conditions.
- 6:08Speaker 2: It is like finding the most likely spot where dart
- 6:11Speaker 2: landed given a scatter of measurements around it.
- 6:13Speaker 1: Okay, that makes sense, But what if the noise isn't uniform.
- 6:16Speaker 2: Right, that's the ideal case. In reality, errors might not
- 6:19Speaker 2: always be perfectly uniform. So if different data points have
- 6:23Speaker 2: different levels of noise different standard deviations, we use weightedly squares.
- 6:27Speaker 2: We minimize the sum of do ah, so.
- 6:29Speaker 1: You divide by the noise level before squaring exactly.
- 6:33Speaker 2: It means we allow larger approximation errors for data points
- 6:37Speaker 2: that are inherently noisier. If you effectively give more weight
- 6:40Speaker 2: to the more reliable measurements, well, it's perfectly intuitive when
- 6:44Speaker 2: you think about it.
- 6:45Speaker 1: Yeah, trust the good data more. The book mentions an
- 6:47Speaker 1: example NMR and frozen cod yes.
- 6:52Speaker 2: Using nuclear magnetic resonance to characterize frozen cod meat. The
- 6:56Speaker 2: goal is to estimate three unknown parameters by one by
- 6:59Speaker 2: two by three that describe the water.
- 7:01Speaker 1: Content from noisy measurements.
- 7:03Speaker 2: Very noisy measures at lease squares helps cut through that
- 7:06Speaker 2: signal chaos to extract those vital parameters.
- 7:09Speaker 1: Okay, so we fit our model. We minimize the squared residuals.
- 7:13Speaker 1: How do we know if it's actually a good fit.
- 7:15Speaker 2: That's crucial. It's not just about having small residuals. If
- 7:18Speaker 2: they're too.
- 7:18Speaker 1: Small, too small, How can they be too small because.
- 7:21Speaker 2: Your model might be overfitting. It's essentially adapting to the
- 7:24Speaker 2: noise itself, the random wiggles, rather than the true underlying signal.
- 7:29Speaker 1: Ah. I see, So it looks great on this data,
- 7:31Speaker 1: but it won't work on new.
- 7:32Speaker 2: Data precisely, it won't generalize. Well, that's undesirable.
- 7:36Speaker 1: So how do we check for that? How do we
- 7:38Speaker 1: judge the fit properly?
- 7:40Speaker 2: This is where residual analysis becomes a really important diagnostic tool.
- 7:45Speaker 2: You don't just compute the fit and walk away. You
- 7:48Speaker 2: scrutinize the.
- 7:49Speaker 1: Leftovers with the noise that's left.
- 7:51Speaker 2: Exactly, you can check if the signs of your residuals
- 7:53Speaker 2: are random. There's something called a run test for that, okay.
- 7:57Speaker 2: Or you can check for trends or correlations in short
- 7:59Speaker 2: sequences of residuals. That's an autocorrelation test.
- 8:02Speaker 1: Are they clumped together somehow?
- 8:03Speaker 2: Yeah? Are there patterns? And there's even a white noise
- 8:06Speaker 2: test using something called a normalized cumulative periodogram. Basically, if
- 8:12Speaker 2: it looks like a straight line, your residuals are behaving
- 8:14Speaker 2: like white noise. If it deviates significantly.
- 8:18Speaker 1: Then there's still some structure left that your model missed.
- 8:20Speaker 2: You got it. The practical takeaway is vital. These tests
- 8:25Speaker 2: help you determine if your model has truly captured all
- 8:28Speaker 2: the relevant information or if there are still hidden trends
- 8:32Speaker 2: that signal a poor fit.
- 8:33Speaker 1: It tells you if you need to go back and
- 8:35Speaker 1: maybe use a different model or refine the one you have.
- 8:38Speaker 2: Exactly, it's your quality control.
- 8:39Speaker 1: Okay, So we understand the what and the why, now
- 8:43Speaker 1: the how how do we actually solve these things? Especially
- 8:46Speaker 1: for the simpler linear case, right.
- 8:48Speaker 2: The linear problem. It often looks like, yeah, minimize b
- 8:52Speaker 2: x two where A is your model matrix x or
- 8:55Speaker 2: the parameters we want, and B are the observations.
- 8:58Speaker 1: Minimize the length of that difference factor correct.
- 9:01Speaker 2: The most straightforward way is using the normal equations you
- 9:03Speaker 2: solve ata x equals ATB.
- 9:06Speaker 1: Okay, seems like a formula X equals ata nash one
- 9:09Speaker 1: at b.
- 9:10Speaker 2: Yep, a direct, elegant, closed form solution. But and it's
- 9:15Speaker 2: a big but there's a major catch. Uh oh, it
- 9:17Speaker 2: could be numerically unstable, especially for what we call ill conditioned.
- 9:21Speaker 1: Problems mal condition What does that mean? Practically?
- 9:23Speaker 2: Imagine trying to balance a pencil perfectly on its very sharp.
- 9:26Speaker 1: Tip, Okay, tricky.
- 9:27Speaker 2: The slightest breath or in our case, tiny rounding errors
- 9:31Speaker 2: in the computer's calculations can send it wildly tumbling. That's
- 9:35Speaker 2: an ill conditioned problem. Your solution becomes incredibly sensitive to
- 9:39Speaker 2: tiny changes in the data B or the matrix A.
- 9:42Speaker 1: So small noise leads to huge errors in the answer X.
- 9:46Speaker 2: Not good, not good at all. And this is where
- 9:49Speaker 2: more robust, sophisticated methods come into play, like.
- 9:52Speaker 1: The QR factorization you mentioned earlier.
- 9:54Speaker 2: Exactly techniques like QR factorization use orthogonal transformations. Yeah, things
- 9:59Speaker 2: like household or or Givens rotations. These preserve the length
- 10:03Speaker 2: the L two norm, which makes them numerically stable.
- 10:06Speaker 1: They rearrange the problem without blowing up errors.
- 10:09Speaker 2: Precisely, they transform A into a nice triangular matrix R,
- 10:13Speaker 2: which is much easier and safer to solve.
- 10:15Speaker 1: So more robust than normal equations generally.
- 10:18Speaker 2: Yes, especially for ill condition problems. Another approach is gram Schmidt,
- 10:23Speaker 2: particularly the modified version MGS.
- 10:25Speaker 1: What's that do?
- 10:25Speaker 2: It generates an orthonormal set of vectors from the columns
- 10:29Speaker 2: of A. It's useful for parallel computation, and it's also
- 10:32Speaker 2: numerically stable, what they call backward stable, sometimes even more
- 10:36Speaker 2: accurate than householder QR.
- 10:38Speaker 1: Okay, so we have options. But you mentioned SVD earlier
- 10:41Speaker 1: as being key.
- 10:42Speaker 2: Ah. Yes, the true superhero here these singular value decomposition
- 10:46Speaker 2: or SVD.
- 10:47Speaker 1: A VD looks complicated.
- 10:49Speaker 2: Decomposes the matrix A into these component parts singular values
- 10:54Speaker 2: and singular vectors. Yeah. The book calls it the necessary
- 10:57Speaker 2: tool for really understanding ill conditioned problem.
- 11:00Speaker 1: Ow.
- 11:00Speaker 2: So it explicitly shows you the sensitivity. It also gives
- 11:04Speaker 2: you the pseudoinverse AA. Think of it as a kind
- 11:07Speaker 2: of almost inverse that works even for rectangular or singular matrices,
- 11:11Speaker 2: where a true inverse doesn't exist.
- 11:13Speaker 1: And that pseudoinverse gives you a solution.
- 11:15Speaker 2: It gives you the minimum norm LSQ solutions or AaB
- 11:19Speaker 2: the solution with the smallest possible size that still minimizes
- 11:23Speaker 2: the residuals.
- 11:23Speaker 1: And SPD tells us how ill conditioned things.
- 11:25Speaker 2: Are, yes through the condition number kind of a. It's
- 11:29Speaker 2: defined as when you are the ratio of the largest
- 11:32Speaker 2: singular value to the smallest non zero singular value.
- 11:35Speaker 1: A bid ratio means a high.
- 11:37Speaker 2: Condition number, which means high sensitivity. You can visualize it
- 11:40Speaker 2: as the eccentricity of a hyper ellipsoid formed when A
- 11:44Speaker 2: transforms a unit sphere. A very stretched e lips means
- 11:48Speaker 2: ill conditioning.
- 11:49Speaker 1: So SPD is like a diagnostic tool and a solution method.
- 11:53Speaker 2: Absolutely, and it's crucial when your problem is ranked efficient,
- 11:58Speaker 2: meaning the columns of A aren't all in dependent. You
- 12:00Speaker 2: don't have enough unique information.
- 12:02Speaker 1: So there isn't one single answer.
- 12:04Speaker 2: Correct, the solution isn't unique. SPD helps here by letting
- 12:07Speaker 2: you find either the minimum norm solution we mentioned, which
- 12:10Speaker 2: silters out in noise associated with small singular values or
- 12:13Speaker 2: a basic solution by carefully selecting independent columns.
- 12:16Speaker 1: Okay, that covers a lot for standard problems. But what
- 12:18Speaker 1: happens when your data gets really big like massive data sets.
- 12:21Speaker 2: Yeah, for large scale problems, those drift methods like QR
- 12:24Speaker 2: or even SBD can become just too expensive. They need
- 12:27Speaker 2: too much memory, too much computation time.
- 12:30Speaker 1: You can't just load the whole matrix A into memory
- 12:32Speaker 1: anymore exactly.
- 12:34Speaker 2: This is where iterative methods, often from the Krylov subspace
- 12:38Speaker 2: family step.
- 12:38Speaker 1: In iterative meaning step by step right.
- 12:41Speaker 2: Instead of computing the exact solution in one go, they
- 12:45Speaker 2: refine an approximate solution over many steps, getting closer and closer.
- 12:49Speaker 1: What's the advantage.
- 12:51Speaker 2: A huge advantage is that they typically only need to
- 12:53Speaker 2: access the matrix A through matrix vector products A times
- 12:57Speaker 2: of vector. This is perfect for sparse problems where A
- 13:01Speaker 2: is mostly zeros. You don't need to store all.
- 13:03Speaker 1: Those zero very efficient for certain structures.
- 13:06Speaker 2: Very examples include the conjugate ingredient CG method, often applied
- 13:10Speaker 2: to the normal equations implicitly, and LSQR, which is a
- 13:14Speaker 2: very popular and robust method that cleverly avoids forming ata explicitly.
- 13:18Speaker 2: What's the downside, Well, they might require many iterations to
- 13:21Speaker 2: converge to a good enough solution, but they preserve the
- 13:25Speaker 2: matrix structure like sparsity and are incredibly memory efficient.
- 13:29Speaker 1: Can you speed them up?
- 13:30Speaker 2: Yes? Often you can use preconditioning. It's a technique to
- 13:33Speaker 2: transform the problem slightly to make it easier for the
- 13:36Speaker 2: iterative method accelerating convergence.
- 13:40Speaker 1: And for truly enormous problems, you.
- 13:42Speaker 2: Might look at block methods. These involve partitioning the giant
- 13:45Speaker 2: problem into smaller manageable blocks. You solve operations on these blocks,
- 13:51Speaker 2: which can often be done more efficiently, maybe even in
- 13:53Speaker 2: parallel across many processors.
- 13:55Speaker 1: Okay, that handles scale, but we skirt it around nonlinearity earlier.
- 13:59Speaker 2: Let's go back there, right, the nonlinear least squares problems.
- 14:04Speaker 2: These are definitely a step up in complexity. A major
- 14:07Speaker 2: issue is multiple local minima.
- 14:09Speaker 1: Those false valleys we talked about.
- 14:11Speaker 2: Exactly many different parameter sets X might look like a
- 14:14Speaker 2: minimum locally, making it really hard to find the true
- 14:17Speaker 2: global minimum unless you have a very good starting guess
- 14:20Speaker 2: for your parameters.
- 14:21Speaker 1: So how do you search for the minimum.
- 14:23Speaker 2: Algorithms like Newton's method use derivatives both first and second
- 14:27Speaker 2: to figure out the landscape. There's also Gaus Newton, which
- 14:30Speaker 2: simplifies things a bit, and a very robust workhourse is
- 14:34Speaker 2: the Leven bird Mark coord method. It cleverly switches between
- 14:37Speaker 2: Gaus Newton and a simpler descent method.
- 14:39Speaker 1: They all use derivatives to guide the search.
- 14:41Speaker 2: Though generally yes. But here's a real breakthrough for a
- 14:45Speaker 2: specific class of problems. The variable projection vr pro algorithm
- 14:50Speaker 2: vr PRO.
- 14:51Speaker 1: What's special about it?
- 14:52Speaker 2: It's the secret sauce for what are called separable nonlinear
- 14:55Speaker 2: least squares problems. These are problems where some of the
- 14:58Speaker 2: parameters x appear linearly in the model and others appear
- 15:02Speaker 2: nonlinearly like a mix. Like a mix, vr pro works
- 15:05Speaker 2: by analytically mathematically eliminating the linear parameters. First. It uses
- 15:11Speaker 2: the pseudoinverse of the part involving the nonlinear parameters.
- 15:14Speaker 1: So you solve for the linear ones automatically.
- 15:16Speaker 2: In effect, yes, this creates a reduced nonlinear problem involving
- 15:20Speaker 2: only the nonlinear parameters, and this reduced problem is often
- 15:23Speaker 2: much better conditioned and converges in significantly fewer iterations than
- 15:27Speaker 2: trying to solve the full mixed problem all at once.
- 15:30Speaker 1: Wow. So even if the calculation per step is similar,
- 15:33Speaker 1: you need fewer steps exactly.
- 15:35Speaker 2: It's like untangling half the knot before you even start
- 15:38Speaker 2: pulling on the rest. Its impact has been massive in
- 15:41Speaker 2: fields like NIMR spectroscopy and even neural.
- 15:44Speaker 1: Network training, faster, more reliable solutions. Okay, Now, in the
- 15:48Speaker 1: real world, sometimes the math gives you answers that don't
- 15:51Speaker 1: make sense physically.
- 15:52Speaker 2: Right, our models often need to follow certain real world
- 15:56Speaker 2: rules or constraints, like what could be linear equality constraints
- 16:01Speaker 2: or linear inequality constraints. A common one is nonnegativity requiring
- 16:05Speaker 2: parameters to be zero or positive, or bound constraints where
- 16:10Speaker 2: a parameter has to stay within a specific range.
- 16:12Speaker 1: And why do we add these.
- 16:14Speaker 2: To ensure our solutions are physically meaningful? For instance, in
- 16:17Speaker 2: computed tomography image reconstruction.
- 16:19Speaker 1: The medical scans, right, you can't.
- 16:21Speaker 2: Have negative tissue density, so you enforce non negativity constraints
- 16:25Speaker 2: on the pixel values you're solving for. Or maybe you're
- 16:28Speaker 2: fitting a model that you know should only increase, so
- 16:30Speaker 2: you enforce it to be monotonically non decreasing makes sense.
- 16:34Speaker 1: What about when data is just missing holes in the
- 16:38Speaker 1: data set.
- 16:39Speaker 2: H missing data a common headache happens all the time
- 16:42Speaker 2: in DNA, MICROAY data, or maybe sensor networks, whereas sensor
- 16:46Speaker 2: fails temporarily. This is where imputation comes in, the art
- 16:49Speaker 2: of intelligently filling in those blanks.
- 16:51Speaker 1: How do you do that intelligently?
- 16:53Speaker 2: There are various techniques. The expectation maximization EM algorithm is
- 16:57Speaker 2: one approach. SVD based imputation uses the dominant patterns and
- 17:01Speaker 2: the existing data to infer missing.
- 17:03Speaker 1: Values, leveraging the structure exactly.
- 17:05Speaker 2: Or there's local le squares LLS imputation. For example, it
- 17:10Speaker 2: might represent a target gene with missing values as a
- 17:13Speaker 2: linear combination of other similar genes that don't have missing values.
- 17:16Speaker 1: Clever, Okay, One more twist. What if all your data
- 17:19Speaker 1: has errors, not just the measurements B, but also the
- 17:22Speaker 1: model matrix A itself.
- 17:23Speaker 2: Good point. That's where totally squares TLS comes in. Standardly
- 17:27Speaker 2: squares remember assumes errors only in the right hand side
- 17:30Speaker 2: B A measurements right, but TLS assumes errors exist in
- 17:33Speaker 2: both A, which might come from measured inputs and B simultaneously,
- 17:37Speaker 2: the problem becomes men e ERF subject to A plus
- 17:41Speaker 2: ex equals B plus R. You're minimizing corrections E to
- 17:44Speaker 2: A and R to.
- 17:45Speaker 1: B, so you're adjusting both the model inputs and outputs
- 17:48Speaker 1: to find a consistent solution.
- 17:50Speaker 2: Exactly. You'd use TLS when you have reason to believe
- 17:52Speaker 2: both A and B contains significant errors. The solution often
- 17:56Speaker 2: involves guess what.
- 17:57Speaker 1: I guess SVD SVD again, usually.
- 18:00Speaker 2: Of the augmented matrix AB. It's a more honest approach
- 18:04Speaker 2: when you know everything is a bit uncertain.
- 18:06Speaker 1: Okay, and looking ahead? The book mentions compressed sensing. What's
- 18:10Speaker 1: that about?
- 18:11Speaker 2: H compressed sensing? This idea is pretty revolutionary. It's about
- 18:14Speaker 2: reconstructing a signal like a vector X from fewer measurements
- 18:19Speaker 2: than we praditionally thought possible, based on the classic Niqwish Shannon.
- 18:22Speaker 1: Theorem fewer measurements.
- 18:24Speaker 2: How it works by making a key assumption that the
- 18:27Speaker 2: original signal X is sparse in some appropriate basis, meaning
- 18:32Speaker 2: if you represent it the right way, like using wavelets,
- 18:35Speaker 2: most of its components are actually zero.
- 18:37Speaker 1: So it has a simple structure underneath.
- 18:39Speaker 2: Exactly, And then you use nonlinear reconstruction methods, often combining
- 18:43Speaker 2: L one and L two minimization terms to find that
- 18:46Speaker 2: sparse solution from the limited measurements.
- 18:48Speaker 1: Why is that cool?
- 18:48Speaker 2: Because it means we might not always need to collect
- 18:51Speaker 2: too much data only to compress it later. We could
- 18:54Speaker 2: potentially design sensors or experiments to capture just the essential
- 18:58Speaker 2: information from the Startallenging the foundations could.
- 19:01Speaker 1: Change how we design instruments medical scanners potentially.
- 19:04Speaker 2: Yes, it's a very active area.
- 19:06Speaker 1: Okay, let's loop back to that ill conditioning problem. We
- 19:09Speaker 1: mentioned that sensitivity the pencil on its tip. It sounds
- 19:12Speaker 1: like a major practical hurdle.
- 19:14Speaker 2: It absolutely is tiny changes in your input data leading
- 19:18Speaker 2: to huge, unstable, often nonsensical changes in the solution X.
- 19:23Speaker 2: It's a nightmare if you don't handle it.
- 19:24Speaker 1: So what's the cure? Is there one?
- 19:26Speaker 2: Thankfully? Yes? The main cure is called regularization. Regularization it
- 19:30Speaker 2: involves introducing additional information or constraints to stabilize the problem,
- 19:34Speaker 2: essentially making that pencil easier to balance.
- 19:38Speaker 1: How does it work?
- 19:39Speaker 2: The most common type is taken off regularization. You modify
- 19:42Speaker 2: the problem to minx x B twenty two plus no
- 19:46Speaker 2: by twenty two.
- 19:46Speaker 1: Hey, what's that second term lou two by twenty two.
- 19:49Speaker 2: That second term penalizes solutions x that have a large
- 19:53Speaker 2: norm a large size. So taking off balance is two things,
- 19:56Speaker 2: minimizing the residual ax B two fitting the data well
- 20:00Speaker 2: and deal minimizing by two keeping the solution itself small
- 20:03Speaker 2: or smooth, preventing it from blowing up.
- 20:05Speaker 1: And Lambda controls the balance exactly.
- 20:07Speaker 2: Octa is the regularization parameter. A small act trust the
- 20:11Speaker 2: data more, A large oct enforces smoothness more strongly.
- 20:14Speaker 1: If that the only.
- 20:15Speaker 2: Way, Another common approach is truncated SVD TSVD. Remember how
- 20:20Speaker 2: SVD breaks down. A TSVD solves the problem by simply
- 20:23Speaker 2: ignoring or truncating the singular values below a certain.
- 20:27Speaker 1: Threshold, just chopping off the troublesome parts.
- 20:30Speaker 2: Essentially, yes, it filters out the directions in the solution
- 20:33Speaker 2: space that are most sensitive to noise, those associated with
- 20:35Speaker 2: tiny singular values. This gives you a smooth or more
- 20:38Speaker 2: stable result.
- 20:39Speaker 1: But choosing that threshold, or choosing lambda and ticking off,
- 20:43Speaker 1: that's crucial and tricky.
- 20:44Speaker 2: It's crucial and it can be tricky. There's no single
- 20:47Speaker 2: perfect method. People use the L curve plotting the residual
- 20:51Speaker 2: norm versus the solution norm for different loss and looking
- 20:53Speaker 2: for a knee or corner in the.
- 20:54Speaker 1: Curve kind of like finding the sweet spot, kind of.
- 20:57Speaker 2: There's also generalized cross validation GCV, which is a more
- 21:01Speaker 2: statistically motivated criterion, and residual analysis comes back to Wow.
- 21:06Speaker 2: You can use tests like that normalized cumulated periodogram. You
- 21:10Speaker 2: choose the uh or truncation level for which the residuals
- 21:13Speaker 2: of your regularized solution start to behave like white noise.
- 21:16Speaker 1: So when the leftover's look random, you've probably done a
- 21:19Speaker 1: good job.
- 21:20Speaker 2: That's the idea. The book uses as an example the
- 21:23Speaker 2: Shaw test problem modeling lights scattering through a slit to
- 21:27Speaker 2: show how regularization beautifully reconstructs images from noisy, ill conditioned data.
- 21:32Speaker 1: Okay, so we have the theory, the algorithms, the fixes
- 21:35Speaker 1: for problems. How does this all come together in real
- 21:37Speaker 1: world applications? You mentioned a few?
- 21:39Speaker 2: Oh, it's everywhere often unseen takes blind data fitting using smooth,
- 21:43Speaker 2: flexible curves called Beest blinds to approximate complex functions.
- 21:47Speaker 1: What's that used for?
- 21:48Speaker 2: Well, things like modeling global temperature anomalies over decades. You
- 21:52Speaker 2: have noisy measurements you want to see the long term trends.
- 21:54Speaker 2: Blines fitted with least squares are perfect for that, giving
- 21:58Speaker 2: us a clearer picture of climate.
- 21:59Speaker 1: Change right and geology.
- 22:00Speaker 2: In geophysical tomography, they use things like bicubic tensor products
- 22:04Speaker 2: b lines for huge ill conditioned problems like modeling salt
- 22:09Speaker 2: SAG surfaces these complex geological interfaces deep underground maybe with
- 22:14Speaker 2: faults wow, or mapping the Monterey Bay topography from scattered
- 22:17Speaker 2: sonar data. These are massive data sets, often needing advanced
- 22:20Speaker 2: techniques like block iterative SVD methods BTSVD to even be solvable.
- 22:26Speaker 1: So understanding Earth's structure? What about AI neural.
- 22:29Speaker 2: Networks absolutely fundamental? There? Least squares is the core method
- 22:33Speaker 2: for training neural networks. That means adjusting their internal parameters,
- 22:37Speaker 2: the weights, so the network learns to map inputs to
- 22:40Speaker 2: outputs correctly.
- 22:41Speaker 1: And variable projection helps there too hugely.
- 22:44Speaker 2: That's secret sauce they or pro drastically improves the training
- 22:48Speaker 2: process for certain network types. An example from the book
- 22:52Speaker 2: is predicting hourly electrical energy consumption in buildings. Better training
- 22:56Speaker 2: means more accurate predictions, saving energy.
- 22:59Speaker 1: That's training. What else?
- 23:00Speaker 2: What's really exciting is using trained neural networks as surrogate
- 23:04Speaker 2: models or digital twins. Digital yeah, for processes that are
- 23:08Speaker 2: incredibly expensive or time consuming to simulate directly. Imagine testing
- 23:12Speaker 2: the progressive collapse potential of a building under extreme earthquake stress.
- 23:17Speaker 2: Running a full physics simulation is slow, okay, But you
- 23:20Speaker 2: can train a neural network using least squares on data
- 23:24Speaker 2: from a few simulations, and it learns to approximate the
- 23:27Speaker 2: simulation's output very quickly.
- 23:29Speaker 1: So you can test lots of scenarios fast exactly.
- 23:32Speaker 2: Or think about optimizing the design of supersonic aircraft you
- 23:35Speaker 2: have conflicting goals maximize range, minimize noise, minimized drag. The
- 23:39Speaker 2: surrogate model let's engineers rapidly evaluate thousands of design choices
- 23:43Speaker 2: and explore pareto fronts the set of best possible trade offs.
- 23:46Speaker 1: That's powerful, okay. What about inverse problems sounds intriguing.
- 23:50Speaker 2: Inverse problems are about finding the hidden causes from observed effects,
- 23:54Speaker 2: like with pis electric transducers, key components in medical ultrasound
- 23:58Speaker 2: right nonlinearly, those squares helps refine the transducer crystal parameters
- 24:03Speaker 2: by fitting models to measured electrical impedance signals, better parameters,
- 24:08Speaker 2: mean clearer ultrafound images, better diagnostics. They even use sensitivity
- 24:12Speaker 2: analysis to see which parameters they can actually estimate reliably
- 24:16Speaker 2: from the data. And NMR again, Yes, in vivo NMR spectroscopy,
- 24:21Speaker 2: variable projection is a star here. It's used for the
- 24:24Speaker 2: accurate quantification of NMR signals directly from living human tissues
- 24:29Speaker 2: like calf muscle or brain tissue.
- 24:31Speaker 1: So measuring molecules inside us.
- 24:32Speaker 2: Exactly, we're providing vital physical insights into totabolism, disease progression, treatment.
- 24:37Speaker 1: Response, and back to geology, back.
- 24:39Speaker 2: To geophysical tomography. Lease squares methods are crucial for inverting
- 24:42Speaker 2: seismic reflection data the echoes bouncing off layers underground to
- 24:45Speaker 2: create incredibly detailed two D and three D velocity models
- 24:49Speaker 2: of the Earth's subsurface.
- 24:50Speaker 1: Mapping oil and gas reserves, understanding earthquakes.
- 24:53Speaker 2: All of that.
- 24:54Speaker 1: Wow, what a journey. Indeed, we've really seen how this
- 24:58Speaker 1: single mathematical idea born out of well necessity centuries ago
- 25:03Speaker 1: for mapping stars.
- 25:05Speaker 2: Yeah, just trying to get.
- 25:06Speaker 1: The best fit, has evolved through these computational breakthroughs like
- 25:09Speaker 1: Gallob's work on SVD and clever algorithms like variable projection.
- 25:14Speaker 2: It's become truly indispensable across science, engineering, even art. If
- 25:19Speaker 2: you think about image processing.
- 25:20Speaker 1: Absolutely, it's really a testament, isn't it to how foundational
- 25:24Speaker 1: mathematical concepts, when you push them, when you adapt them
- 25:27Speaker 1: to new challenges, can a.
- 25:28Speaker 2: Lock insights and solve problems we probably couldn't have even
- 25:31Speaker 2: imagined back then.
- 25:32Speaker 1: It's not about finding perfection in the data, because the data.
- 25:35Speaker 2: Is messy, exactly. It's about finding the most probable truth,
- 25:38Speaker 2: the best explanation in a world that's just inherently noisy
- 25:42Speaker 2: and full of uncertainty.
- 25:43Speaker 1: So maybe the next time you, our listener, see a
- 25:46Speaker 1: precisely mapped landscape on your phone, or a crystal clear
- 25:49Speaker 1: medical image from an MRI, or even just the sleek
- 25:52Speaker 1: design of a new aircraft take over, yeah, take a
- 25:55Speaker 1: moment to consider the unseen force at work behind the scenes,
- 25:59Speaker 1: this humble yet incredibly powerful least Square's method, constantly adapting,
- 26:04Speaker 1: constantly refining or understanding of our wonderfully messy, noisy world,