zhuangwei的个人博客分享 http://blog.sciencenet.cn/u/zhuangwei

博文

Use R: 画泰勒图 Taylor Diagram,模型比较一目了然

已有 12075 次阅读 2020-10-14 22:54 |个人分类:R|系统分类:科研笔记

IPCC推荐的模型评价方法:

在做模型相关的工作时,我们经常会需要比较模拟效果。当使用多个模型时,看那个模型的模拟效果更好些,模拟误差更小,仅仅画散点图进行比较是不直观的。Taylor Diagram 泰勒图是一种可以直观进行模型比较的方法。它巧妙利用三角函数几何原理,把三种评价模型的指标在一张图上展现。IPCC的报告也推荐了这种方法:

Since the SAR, Taylor (2000) has devised a very useful diagrammatic form (termed a “Taylor diagram” − see Section 8.5.1.2 for description) for conveying information about the pattern similarity between a model and observations. This same type of diagram can be used to illustrate the relative accuracy amongst a number of model variables or different observational data sets (see Section 8.5.1). One additional advantage of the “Taylor diagram” is that there is no restriction placed on the time or space domain considered.

详见: https://www.ipcc.ch/site/assets/uploads/2018/03/TAR-08.pdf


Taylor对他的方法的几何原理详细论述见下面的pdf

Taylor_diagram_primer.pdf

Taylor Diagram Primer by Karl E. Taylor January 2005 

Taylor diagrams (Taylor, 2001) provide a way of graphically summarizing how closely a pattern (or a set of patterns) matches observations

The similarity between two patterns is quantified in terms of:

(1) their correlation, 

(2) their centered root-mean-square difference 

and (3) the amplitude of their variations (represented by their standard deviations). 

These diagrams are especially useful in evaluating multiple aspects of complex models or in gauging the relative skill of many different models (e.g., IPCC, 2001).


举两个例子

例如,下面这张图上,评价比较了八个模型对蒸散模拟的表现,我们看到图中有三个衡量的指标standard devitation, correlation, 和 centred RMS error. 标准差standard devitation这里是有量纲的,当然我们可以通过除以观测值的平均值,使其变为无量纲。观测值oberved 的standard devitation约为33 mm/month,G-G模型的standard devitation是所有模型中最大的。看模拟值与观测值的相关性correlation,GLEAM v3c的相关性是最高的,约为0.75,CABLE-2.3.4的最低,约为0.42。以oberved所在点为圆心,看centred RMS error,发现SBM这一组的三个模型的centred RMS error是最低的。综合来看,SBM这一组的模型表现最优。


image.png

再看IPCC报告里面的例子,下面的图中列出了不同control runs的CMIP2模型,对表面气温、海平面气压和降雨的模拟效果。这里的standard deviation就是经过标准化的,无量纲的,所以尽管这三个量的单位不同,但可以在同一个Taylor Diagram上展示。我们看到,相比绿色点(海平面气压)和蓝色点(降雨),红色表示降雨模拟的点,correlation是最高的。

image.png

代码实现

具体的画法,可以使用plotrix package。

https://rdrr.io/cran/plotrix/man/taylor.diagram.html

library(plotrix)
# fake some reference data 参考值,即相当于观测值
ref<-rnorm(30,sd=2)
# add a little noise,相当于第一种模型的模拟值
model1 <- ref+rnorm(30)/3
# add more noise, 相当于第二种模型的模拟值
model2 <- ref+rnorm(30)
# add more noise, 相当于第三种模型的模拟值,误差更大
model3 <- ref+rnorm(30)*1.5


# 查看参考值(观测值)与我们自己创造的模拟值的散点图
par(mfrow= c(1,3))
plot(ref,model1, main='model 1', ylab='modelled values')
plot(ref,model2, main='model 2')
plot(ref,model3, main='model 2')


# 画出泰勒图,进行模型比较
par(mfrow= c(1,1))
# display the diagram with the better model
oldpar<-taylor.diagram(ref,model1,sd.arcs=1)

# now add the worse model
taylor.diagram(ref,model2,add=TRUE,col="blue")

# now add the worst model
taylor.diagram(ref,model3,add=TRUE,col="green")

# get approximate legend position
lpos<-1.5*sd(ref)
# add a legend
legend(lpos,lpos, # 可以改变图例的位置
      legend=c("Better","Worse", "Worst"),pch=19,col=c("red","blue", 'green'))


image.png

构造的观测值与三组模拟值的散点图,直观看到model 1与参考值的线性相关关系最好,在一种图上比较这三种模型的拟合效果,就可以看下面的泰勒图:

image.png

可以明显看到model 1在泰勒图中的Correlation 最高,距离参考点的距离最近,即centred RMS error最小。



https://wap.sciencenet.cn/blog-526092-1254410.html

上一篇:USE R 画出散点密度图
下一篇:推荐一款可以替代Endnote的文献管理软件 Zotero
收藏 IP: 120.82.237.*| 热度|

1 杨伟伟

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-3-29 00:34

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部