I have Statistics and Machine Learning Toolbox but cannot use allfitdist
조회 수: 3 (최근 30일)
이전 댓글 표시
I tried running a script I found on http://blogs.mathworks.com/pick/2012/02/10/finding-the-best/ to learn how to find the best distribution fit. When I run the script
% Create a normally distributed (mu: 5, sigma: 3) random data set
x = normrnd(5, 3, 1e4, 1);
% Compute and plot results. The results are sorted by "Bayesian information % criterion".
[D, PD] = allfitdist(x, 'PDF');
I get this error message:
Undefined function or variable 'allfitdist'.
Error in Find_best_distribution (line 7) [D, PD] = allfitdist(x, 'PDF')
I tried using the ver command to confirm that I have the Statistics toolbox and got this:
MATLAB Version 9.0 (R2016a) Statistics and Machine Learning Toolbox Version 10.2 (R2016a)
I also tried the disttool command and that worked.
Why can I not run allfitdist?
Thanks, Josefin
댓글 수: 0
채택된 답변
Marc
2016년 6월 10일
Did you download allfitdist.m from the file exchange? This is not a Mathworks function. If you go back to the blog, there is a link that will take you to the file exchange for allfitdist. Download the file and make sure that you put it in a folder on your path
추가 답변 (1개)
Ginés Aníbal
2022년 8월 16일
Thank you very much Marc!!!!
The zip that indicated for the download, did not contain that added function.
I'm trying to get conditional probabilities between 2 (for now), and 3 hydrological variables.
I will be aware that the authors have news with the extension for more than 2 variables...
best regards, Ginés.
댓글 수: 2
Walter Roberson
2022년 8월 16일
An archived copy appears to be at https://gitlab.imk-ifu.kit.edu/c.lorenz/Copula_Bias_Correction/-/blob/580c096a56949d32c59e67e26300aa59e68f9ed5/allfitdist.m
Ginés Aníbal
2022년 8월 16일
Hello Walter: I did not finish the explanation well: the link indicated 'allfitdist' below, but not in the zip. I downloaded it separately, and as far as I've tried, it works.
But I'll follow your advice, in case this adds any bias correction.
thanks, and best regards
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Data Preparation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!