如何用mathematica计算拟合度?给程序,谢谢,比如,我的一次线性数据是: data1 = {{0.0217, 0.0476}, {0.0424, 0.09559}, {0.0627, 0.142}, {0.0833, 0.189}, {0.104, 0.237}, {0.1242, 0.283}} k = Fit[data1, {1, x}, x] f = Plot[k, {x, 0.00
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 23:54:49
如何用mathematica计算拟合度?给程序,谢谢,比如,我的一次线性数据是: data1 = {{0.0217, 0.0476}, {0.0424, 0.09559}, {0.0627, 0.142}, {0.0833, 0.189}, {0.104, 0.237}, {0.1242, 0.283}} k = Fit[data1, {1, x}, x] f = Plot[k, {x, 0.00
如何用mathematica计算拟合度?
给程序,谢谢,比如,我的一次线性数据是: data1 = {{0.0217, 0.0476}, {0.0424, 0.09559}, {0.0627, 0.142}, {0.0833, 0.189}, {0.104, 0.237}, {0.1242, 0.283}} k = Fit[data1, {1, x}, x] f = Plot[k, {x, 0.00, 0.15}] g = ListPlot[data1] Show[f, g] 如上图像已经画出来了,怎么算拟合度R?
如何用mathematica计算拟合度?给程序,谢谢,比如,我的一次线性数据是: data1 = {{0.0217, 0.0476}, {0.0424, 0.09559}, {0.0627, 0.142}, {0.0833, 0.189}, {0.104, 0.237}, {0.1242, 0.283}} k = Fit[data1, {1, x}, x] f = Plot[k, {x, 0.00
……线性回归有个更专业的函数的,LinearModelFit,从中可以提取多种参数,当然也包括相关系数:
data1 = {{0.0217,0.0476},{0.0424,0.09559},{0.0627,
0.142},{0.0833,0.189},{0.104,0.237},{0.1242,0.283}};
lm = LinearModelFit[data1,x,x];
lm["RSquared"]
(*0.999994*)