{"id":220,"date":"2020-02-10T23:07:31","date_gmt":"2020-02-10T23:07:31","guid":{"rendered":"http:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/tamas-papp\/?p=220"},"modified":"2020-04-20T17:37:00","modified_gmt":"2020-04-20T17:37:00","slug":"splines","status":"publish","type":"post","link":"https:\/\/www.lancaster.ac.uk\/stor-i-student-sites\/tamas-papp\/2020\/02\/10\/splines\/","title":{"rendered":"Splines: how do they work?"},"content":{"rendered":"\n
Every so often at STOR-i there are talks on sophisticated data analysis techniques, during which I’ve heard the word \u201cspline\u201d thrown around quite a lot. As someone who wasn’t aware of what they were, I’ve read around a bit and I’d like to offer some insight and possibly clear some misconceptions about them.<\/p>\n\n\n\n
First, a historical note. Splines<\/a>, originally a shipbuilding term, were long strips of wood bent into smooth shapes by holding them fixed at certain points, usually by lead weights called \u201cducks\u201d.<\/p>\n\n\n\n In mathematics, we build on this idea to call a smooth piecewise polynomial a spline, which is generally used to approximate some unknown curve. Each piece of a spline is specified in between two \u201cknots\u201d (analogous to the ducks), where the spline is forced to be as smooth as possible, roughly speaking.<\/p>\n\n\n\n The traditional use of splines is for interpolation (fitting a curve that goes through some points exactly), in which case we choose the knots to tell us where the spline must pass through, not unlike the nails in the above drawing. While a single polynomial of high enough degree could pass through a finite set of points just fine, it would exhibit Runge’s phenomenon<\/a>, oscillating wildly at the boundary of its domain. This is unrealistic, and we can tactfully avoid it by using lower degree splines.<\/p>\n\n\n\n\t\t