I was reading the Mathworks documentation about the CSAPS and TPAPS. I got confused in 2D case where I can't understand how these two penalties are different? Hows the PSS looks like in the case of 2D for CSAPS?


The function csaps creates a tensor-product smoothing spline, which means that the roughness penalties in the two (or more) directions are handled independently of each other. So in the 2D case, the roughness penalty would have a term for $|D_1D_1f|^2$ and a term for $|D_2D_2f|^2$, each with their own smoothing parameters p that can set independently of one another.

On the other hand, tpaps (for 2D data only) creates a thin-plate smoothing spline, which means that the roughness penalty is based on the sum $|D_1D_1f|^2 + 2|D_1D_2f|^2 + |D_2D_2f|^2$. Note the additional term here for the mixed derivative. Also, in this case there is a single smoothing parameter p that controls all three terms simultaneously.

An advantage of tpaps is that its roughness penalty is invariant under rotations. This could be desirable if you are dealing with data where the two dimensions have the same units, such as if the function $f$ is supposed to represent a physical surface. In this case, there is a physical interpretation of the fit as (approximately) minimizing the surface's bending energy, subject to the constraint on the amount of error between the fit and the data. On the other hand, csaps could be more appropriate if the two dimensions are on different scales.

  • $\begingroup$ Thanks, @brent. I am trying to fit the surface to the illumination channel of a digital image. I noticed in Matlab that tpaps works for the square surfaces (e.g 500*500) but not for the different scale of rows and columns. Is there any book/paper I could site for this information? Thanks. $\endgroup$ – Jay Patel Aug 3 '17 at 11:35
  • $\begingroup$ A good place to start might be to take a look at en.wikipedia.org/wiki/Smoothing_spline#Multidimensional_splines, which contains several references. $\endgroup$ – Brent Kerby Aug 3 '17 at 15:48
  • $\begingroup$ sorry one more question. @Brent. how does csaps create the tensor product smoothing spline? Thanks again! $\endgroup$ – Jay Patel Sep 7 '17 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.