R 计算rmse
2016-11-01 21:51:35| 分类:
R
| 标签:
|举报
|字号大中小 订阅
library(zoo)
library(hydroGOF)
library(termstrc)
filePathReal <-"/data/calf/csv/eleh/csvreal/2016/20161028/201610280100.csv"
filePathFit <-"/data/calf/csv/eleh/csvfit/2016/20161028/201610280100.csv"
data1 <- data.frame(read.csv(filePathReal,header = F))
head(data1)
length(data1[,2])
# data1<-read.csv(filePathReal,header = F)
data2<-read.csv(filePathFit,header = F)
names(data1)[names(data1)=='V8'] ='real'
names(data2)[names(data2)=='V8'] ='fit'
res<-merge(data1,data2,by.x = 'V2',by.y = 'V2')
res0 <- subset(res, res$V2 <= '60000')
length(res0[,1])
res1 <- subset(res0, res0$real != 'NaN')
length(res1[,1])
# a<-result[c('real')]
# b<-result[c('fit')]
mse <- rmse(res1[c('real')],res1[c('fit')])
评论这张
转发至微博
转发至微博
评论