0

I would like to assess the fit a given curve with some data points by computing the (idelly, adjusted) R^2, using Matlab. All the tutorials I could find online explain how to do this when the curve has been obtained directly from the data set, but in my case the curve has been determined independently and I need to compute R^2 as a measure of the fit to the new data set, which I'm using as a test. Is there any routine in Matlab to do this?

sdnnds
  • 101
  • 1
  • I am pretty sure the Curve Fitting Toolbox offers methods to do this. Are you looking for a vanilla Matlab solution? If so can you specify how your curve would be parameterized? – paisanco Aug 02 '15 at 17:33
  • The curves are parameterized differently. The simplest is in the form y(x)= C1*heaviside(x-C2)*(x-C2)^C3, where the C's are constants that I have determined from the training set using regression. Both y and x are functions of time t; in the most complicated case I would need to consider a predicting equation for y(t) in terms of x evaluated at several earlier times, so it's not a straightforward equation, but I have computed y(t) explicitly as a set of values and I was hoping to be able to use that directly. – sdnnds Aug 02 '15 at 17:54
  • more information needed for your question. – NKN Aug 02 '15 at 19:09

0 Answers0