当前位置:网站首页>Knowledge about the determination coefficient R2 and the relationship with the correlation coefficient

Knowledge about the determination coefficient R2 and the relationship with the correlation coefficient

2022-06-26 14:12:00 Orange tea must be ^ -^

https://blog.minitab.com/en/adventures-in-statistics-2/regression-analysis-how-do-i-interpret-r-squared-and-assess-the-goodness-of-fit

Coefficient of determination R2 There are many formulas for calculating , Calculate with different formulas under different conditions , To get the correct coefficient of determination ( Goodness of fit ), Let's make a summary to consolidate the knowledge points .

1、R2 The value is usually [0-1] Between the value of the , The closer we get 1 It shows that the better the fitting . But it often happens R2 Greater than 1 The situation of , This does not mean that your model must be wrong ,R2 It is used to calculate the goodness of fit of linear regression model , Using linear regression R2 The fitting of nonlinear regression model calculated by formula may occur R2 Greater than 1 The situation of . General linear regression model calculation R2 The formula of is :

R^{2}=SSR/SST=\frac{\sum(pre_y-mean_y)^2 }{\sum (y-mean_y)^2}=1-\frac{SSE}{SST}

among SST=SSR+SSE,SSR Is the sum of regression squares ,SST Is the sum of the total squares ,SSE Is the sum of the squares of the residuals ( The residual is the predicted data - Actual data :pre_y-y).

2、 The model is a nonlinear regression model , It can also be used. R2 To assess the , The formula is as follows :

R^{2}=\frac{(l\sum (pre_y.y)-\sum pre_y.\sum y))^2}{((l\sum pre_y^2)-(\sum pre_y)^2).(l\sum y^2)-(\sum y)^2)}

among pre_y Is forecast data ,y For actual data ,l Number of samples for each indicator .

The correlation coefficient r It refers to the statistical index that reflects the close relationship between variables . According to the different characteristics between related phenomena , The names of the statistical indicators are different . For example, the statistical index that reflects the linear correlation between the two variables is called the correlation coefficient ( The square of the correlation coefficient is called Determination factor ); Will reflect the relationship between the two variables Curve correlation The statistical index of the relationship is called the nonlinear correlation coefficient 、 Non linear determination coefficient ; The statistical index reflecting the multivariate linear correlation is called Complex correlation coefficient 、 Complex decision coefficient, etc .

https://cloud.tencent.com/developer/article/1385975

原网站

版权声明
本文为[Orange tea must be ^ -^]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170509534102.html