Re: [討論] 請問Matlab算R-squared值已回收

看板MATLAB作者 (...)時間13年前 (2010/12/16 09:46), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/3 (看更多)
: → banco:Matlab算出來的0.9782要平方 0.9782^2 = 0.9568 12/14 23:22 : → Cinkot:原來如此~ 12/15 01:10 : → Cinkot:我剛剛又試了 [b,bint,r,rint,stats] = regress(y,X) 12/15 01:11 : → Cinkot:help說stats包含了R平方 可是套進我的數據沒有用.. 12/15 01:11 : → Cinkot:就是算不出來.. 12/15 01:12 : → Cinkot:而help說X should include a column of 1 12/15 01:12 : → Cinkot:但數據裡面都是沒有1可以include.. 12/15 01:12 : → Cinkot:後來用cftool去fitting 出來的R是0.9995!! 12/15 01:14 : → Cinkot:可是我還是不知道要怎麼算R.. 12/15 01:14 感謝B大解說~ 昨天try了後來用 fit 有算出來 type=fittype('a*x.^4+b*x.^3+c*x.^2+d*x+e'); [coef stats]fit(xdata,ydata,type,'start',[0 0 0 0 0]) 這樣在stats.rsquare的值就是R值了 只是不知道有沒大大知道多項式的R值公式阿? 網路上的資料都是 1-SSR/TSS 的就是Matlab的corrcoef 感謝 -- ▃▅ █▎ █▎ █▏█▎ █▎ █▅▄▃ ▉ █▎ █▎ █◤ █ █ ◤ ▆█▍ ▅▄▄█ █▎ █▎ █ █ ▋ ◣ █▎ ▌ ◥█▄▃ █▌ █ █ ▌ ◥▌ ◥▄▊ █▅◤ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 121.254.84.49
文章代碼(AID): #1D2M-Jfc (MATLAB)
文章代碼(AID): #1D2M-Jfc (MATLAB)