1
$\begingroup$

I got some articles/books about the cubic splines. However, I didn't see anyone mentioning the bivariate case of cubic spline much in detail. My question is how to write the cubic spline in a bivariate case with knots?

I am trying to perform the multiple linear regression with two regressors x and y, and 1 predicted variable z = f(x,y).

$\endgroup$
  • $\begingroup$ You're interested in regression, not interpolation, right? $\endgroup$ – DeltaIV Aug 13 '17 at 18:18
  • $\begingroup$ @DeltalV Yes. Piecewise polynomial regression using spline basis functions.Basically on an image. x and y are the rows and columns and z is the intensity values. $\endgroup$ – Jay Patel Aug 13 '17 at 18:27
  • $\begingroup$ Then just use tensor product splines. Here is a fully worked out example. The answer uses ginv, which is not the best choice (qr would be more appropriate), but in practice unless you have a lot of data, or the condition number of X is large (in which case the condition number of t(X) %*% X will be quadratically as large), you shouldn't have problems. $\endgroup$ – DeltaIV Aug 13 '17 at 19:52
  • $\begingroup$ I was considering csaps for the surface fit. I tried thin plate spline but my rows and columns are of different scale so I couldn't use it in Matlab as they need to be same for thin plate spline. I am interested in using interpolation as well if that is giving a good estimation of the intensity distribution of grayscale image $\endgroup$ – Jay Patel Aug 13 '17 at 20:04
  • $\begingroup$ If this is an implementation-specific question, then it's not a good fit for CV: it would be better suited for SO. Anyway, did you read this? $\endgroup$ – DeltaIV Aug 14 '17 at 7:38

Your Answer

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

Browse other questions tagged or ask your own question.