How can i calculate PDF and CDF of non-parametric distribution?

5 次查看(过去 30 天)
I want to do probabilistic forecast from point forecast. I do have error distribution (non parametric) from point forecast. How can i calculate PDF and CDF of non-parametric distribution?

采纳的回答

Star Strider
Star Strider 2021-7-30
I am not certain what your data are. If ,they are appropriate for the function, I would begin with the ecdf function, since it is intended to do exactly what it appears that you want to do. It is usually easier to get the CDE first, then diferentiate it to get the PDF. See the See Also section of that documentation for similar functions.
  11 个评论
Star Strider
Star Strider 2021-8-27
I honestly have no idea.
I have never heard ot that, and so I have no experience with it.
.
israt fatema
israt fatema 2021-8-27
my problem here is with inisializing the vector, which is not working for me properly since i have my own obs and fcst, not a vactor with random number. My obs vector should be (13 x 13) and fcst is (13 x 1)
obs: [7445.2, 7479.02, 7581.5, 7673.74, 7735.22, 7780.17, 7828.16, 7869.96, 8028.72, 8180.64, 8223.12, 8415.97, 8515.09];
fcst: [7438.35, 7502.96, 7548.12, 7683.68, 7797.14, 7846.95, 7887.55, 7922.21, 7950.36, 8160.52, 8318.25, 8261.64, 8474.051073];
INPUT
obs: Vector of observations
fcst: Matrix of Ensemble forecast of size N x M. NB: N must equal length(obs), M equals the number of ensemble members
plot_pos: plotting positions that determine cumulative distribution function
OUTPUT
mean_CRPS: Mean of non missing CRPS values
crps_values: A vector (length n) of CRPS values
num: number of non missing CRPS values used to compute mean_CRPS
EXAMPLES:
fcst = rand(1000,1000);
obs = rand(1000,1);
[meanCRPS] = crps(fcst,obs);

请先登录,再进行评论。

更多回答(1 个)

Bjorn Gustavsson
Bjorn Gustavsson 2021-7-30
You get some start towards estimates of the PDF/CDF from histogram and ksdensity. See the help and documentation to those functions. The next step (possibly) for you would then be to convert those estimates into a form (interpolating+extrapolating function?) that suits your forecast implementation - this might be trivial or "challenging" depending on circumstances - but those functions should give you first estimates.
HTH

类别

Help CenterFile Exchange 中查找有关 Probability Distributions 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by