2

パッケージtaylor.diagram内の関数を使用しています。plotrix

obs = runif(100,1,100)
mod1 = runif(100,1,100)
mod2 = runif(100,1,100) 
mod3 = runif(100,1,100) 
taylor.diagram(obs,mod1)
taylor.diagram(obs,mod2,add=TRUE)
taylor.diagram(obs,mod3,add=TRUE)

ここに画像の説明を入力

In the conventional Taylor diagram there is no bias but in his paper (Taylor, 2001, K.E. Summarizing multiple aspects of model performance in a single diagram Taylor JGR, 106, 7183-7192) Taylor says that

"Although the diagram has been designed to convey information about centered pattern differences it is also possible to indicate differences in overall means (i.e., the bias). This can be done on the diagram by attaching to each plotted point a line segment drawn at a right angle to the straight line defined by the point and the reference point. If the length of the attached line segment is equal to the bias, then the distance from the reference point to the end of the line segment will be equal to the total (uncentered) RMS error"

I admit that I don't know where to start to try and do this. Has anyone succeeded at adding this information on the plot?

4

1 に答える 1

5

私が正しく理解していれば、バイアスはモデルベクトルと観測ベクトルの平均の差です。次に、問題は、(a)観測点とモデル点の間の線を見つけること、(b)この線に垂直な線を見つけること、(c)モデル点からの距離が等しい垂直線に沿った点を見つけることです。バイアスに。

考えられる解決策の1つは次のとおりです。

taylor.bias <- function(ref, model, normalize = FALSE){
    R <- cor(model, ref, use = "pairwise")
    sd.f <- sd(model)
    sd.r <- sd(ref)
    m.f <- mean(model)
    m.r <- mean(ref)

    ## normalize if requested
    if (normalize) {
        m.f <- m.f/sd.r
        m.r <- m.r/sd.r
        sd.f <- sd.f/sd.r
        sd.r <- 1
        }

    ## calculate bias
    bias <- m.f - m.r

    ## coordinates for model and observations
    dd <- rbind(mp = c(sd.f * R, sd.f * sin(acos(R))), rp = c(sd.r, 0))

    ## find equation of line passing through pts
    v1 <- solve(cbind(1, dd[,1])) %*% dd[,2]    

    ## find perpendicular line
    v2 <- c(dd[1,2] + dd[1,1]/v1[2], -1/v1[2])

    ## find point defined by bias
    nm <- dd[1,] - c(0, v2[1])
    nm <- nm / sqrt(sum(nm^2))
    bp <- dd[1,] + bias*nm

    ## plot lines
    arrows(x0 = dd[1,1], x1 = bp[1], y0 = dd[1,2], y1 = bp[2], col = "red", length = 0.05, lwd = 1.5)
    lines(rbind(dd[2,], bp), col = "red", lty = 3)
    lines(dd, col = "red", lty = 3)
    }

それで、

library(plotrix)
obs = runif(100,1,100)
mod1 = runif(100,1,100)
taylor.diagram(obs,mod1)
taylor.bias(obs,mod1)

赤いベクトルの長さがバイアスを示し、ベクトルの先端と基準点を結ぶ点線の長さが RMS エラーです。赤のベクトルの方向は、バイアスの符号を示します。下の図では、負のバイアスです。

ここに画像の説明を入力

于 2014-02-25T20:14:33.093 に答える