R验证包
我解决了读取数据的问题,并从 R 的验证包中得到了一些图。现在我想知道如何在 R 中排列数据,即我排列观察数据,如 (120, 396),其中 120 是前置时间,396是总的初始时间。预测数据有一个额外的集合成员维度,如 (120, 396,10)。在将这些数据集放入验证包的验证功能之前,我确实喜欢这样,
obs=round(runif(100))
forecast=runif(100)
我不知道为什么这个过程是必要的以及它的作用,但在放入验证功能之前这是必要的。然后使用我使用的验证函数,
verify(obs,forecast,obs.type="binary",frcst.type="prob")
然后一切正常,我可以将验证函数的结果用于其他事情。但我不知道验证包是如何工作的以及我的数据排列是否正确?上述数据集120、396中取哪个维度作为样本维度?
I solved the problem of reading the data and got some plots from verification package of R. Now i want to know that how to arrange data in R i.e. i arranged the observation data like (120, 396) where 120 is the lead time and 396 is the total initial time. The forecast data has one extra dimension of ensemble member like (120, 396,10). Before putting these data sets into verify function of verification package, i do like this
obs=round(runif(100))
forecast=runif(100)
I do not know why this process is necessary and what it does but it is necessary before putting into verify function. Then to use verify function i use,
verify(obs,forecast,obs.type="binary",frcst.type="prob")
Then everything is OK and i can use the result of verify function to other things. But i do not know how verification package works and my data arrangement is correct? Which dimension is taken as sample dimension in above data set 120, 396?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须告诉
verify
您希望它查看哪些数据以及数据的类型。因此,您显示的示例行有两个向量,其中obs
为 0 或 1,是一个二进制变量,而forecast
在 0 和 1 之间连续,是一个概率。您的数据看起来在观察和预测中都可能是连续的,您可能希望将
verify
应用于每对或三元组的第二个元素。如果是这样,查看此示例可能会帮助您了解verify
在这种情况下如何工作。显然,当您验证自己的观察和预测时,您将需要使用自己的变量名称。
You have to tell
verify
which data you want it to look at and what type of data it is. So the example lines you show have two vectors, whereobs
is 0 or 1 and is a binary variable, whileforecast
is continuous between 0 and 1 and is a probability.Your data looks as if it may be continuous both in the observation and the forecast and you may want to apply
verify
to the second element of each pair or triple. If so, looking at this example may help you understand howverify
can work in such cases.Clearly you will need to use your own variable names when you come to verify your own observations and forecasts.