Timeline for incremental $R^2$ update at every new sample [duplicate]
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 2, 2019 at 0:26 | comment | added | Glen_b |
On the other hand, R^2 doesn't really make so much sense for a nonlinear model; I'd expect that would be explicitly mentioned (and defined) if it were the case; secondly the OP mentioned RSQ which is an Excel function which does the squared-correlation calculation I discussed.
|
|
Oct 2, 2019 at 0:15 | comment | added | user20160 | @Glen_b True, but the question didn't mention anything about linear regression; I had hoped the OP could be more explicit since this doesn't hold for nonlinear models. In any case, I guess it doesn't matter much at this point. | |
Oct 1, 2019 at 23:43 | history | duplicates list edited | Glen_b | duplicates list edited from Efficient online linear regression to Efficient online linear regression, Online update of Pearson coefficient | |
Oct 1, 2019 at 23:42 | history | closed | Glen_b | Duplicate of Efficient online linear regression | |
Oct 1, 2019 at 23:42 | comment | added | Glen_b | @user20160 When there's only one predictor for a linear regression model $R^2$ will simply be the squared correlation between the two series of values. One needn't even identify which is the DV and which is the IV to calculate the correlation between them; the question offers enough information (identifying the two series) to answer the question. | |
Oct 1, 2019 at 17:23 | comment | added | elemolotiv | @Glen_b thanks for the comments, there is enough info to work on. Up to you whether to keep or discard my question. I have saved the links in your comments 🙂 | |
Oct 1, 2019 at 15:35 | comment | added | user20160 | I'm having trouble understanding what your $R^2$ refers to. $R^2$ measures the goodness of fit of predictions to known target values. But, what are your target values, what are your predictions, and how are you generating them? | |
Oct 1, 2019 at 14:50 | comment | added | whuber♦ | See Efficient online regression for how to update everything efficiently. | |
Oct 1, 2019 at 13:29 | comment | added | Glen_b | I'm in two minds whether it counts as effectively a duplicate of that first link or whether there's enough in the special structure of this problem to leave it. | |
Oct 1, 2019 at 13:21 | comment | added | Glen_b | ctd ... but you'll probably find that first method sufficient just applied directly to the y's and the 1,2,3... values | |
Oct 1, 2019 at 13:08 | comment | added | Glen_b | You could adapt the online updating approach here, but instead of calculating $r$, calculate its square; i.e. $r^2 = \frac{N_{n+1}^2}{D_{n+1}E_{n+1}}$. You can speed it up further than that (e.g. by using ideas from Welford's algorithm; and the equivalent for covariance and taking advantage of the simple form of the 1,2,3... values & hence their mean and sum of squares),...ctd | |
Oct 1, 2019 at 12:46 | comment | added | elemolotiv | thanks @Glen_b I edited away the analogy of incremental variance calculation | |
Oct 1, 2019 at 12:44 | history | edited | elemolotiv | CC BY-SA 4.0 |
deleted 170 characters in body
|
Oct 1, 2019 at 12:41 | comment | added | Glen_b | You really don't want something as badly behaved as that formula. That's frequently a disastrous way to calculate variance. There are much more stable ways to calculate variance. Note that R^2 can be written as a ratio of two sums of squares | |
Oct 1, 2019 at 12:36 | history | edited | elemolotiv | CC BY-SA 4.0 |
added 12 characters in body
|
Oct 1, 2019 at 12:27 | history | asked | elemolotiv | CC BY-SA 4.0 |