我有一个关于决定系数的问题。
我需要找出两个 vector 之间的关系。
给定两个数值 vector x和y,它们的系数确定可以表示为:
1 - ( 1 - (dot_product(x,y))^2 / (|x|^2 + |y|^2)) / (1 - |y| * |y|/ ( y'dimension * |y|^2 ) )
|x|^2 = sum of squared of each element of vector x.
|y| = sum of each element of vector y.
对吗?
我从一些代码中得到了公式,但我不认识作者。
如何理解?
如有任何帮助,我们将不胜感激!
最佳答案
来自 wiki: Coefficient of determination .
In statistics, the coefficient of determination, denoted R2 and pronounced R squared, indicates how well data points fit a statistical model – sometimes simply a line or curve. It is a statistic used in the context of statistical models whose main purpose is either the prediction of future outcomes or the testing of hypotheses, on the basis of other related information. It provides a measure of how well observed outcomes are replicated by the model, as the proportion of total variation of outcomes explained by the model.[1 The correlation coefficient,
r
, and the coefficient of determination,r^2
.
计算r
的数学公式为:
其中 n
是数据对的数量。
引用资料:
关于c++ - 通过确定系数找到两个 vector 的关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22214727/