Import Custom Distributions programmatically

2 vues (au cours des 30 derniers jours)
John
John le 2 Oct 2014
I have a custom distribution in the +prob folder in my working directory. I can import this distribution by running the dfittool gui, then going to file -> import custom distributions. Is there a way to achieve the same (or similar) effect programmatically?
  1 commentaire
Bruno Pop-Stefanov
Bruno Pop-Stefanov le 7 Oct 2014
Hi John,
I was playing around with dfittool to see if there is a programmatical workflow, but I am not sure I understand what File > Import Custom Distributions does. I created a custom Laplace distribution by clicking File > Define Custom Distributions. This is what the doc explains. Then, I close and re-open dfittool and the new Laplace distribution is already there. Doing File > Import Custom Distributions seems to have no effect at all.
Would you mind explaining what this menu option does and what you were expecting to do with a programmatic workflow? Does it allow fitting outside of the Distribution Fitting Tool?
Thanks!

Connectez-vous pour commenter.

Réponses (1)

Tom Lane
Tom Lane le 9 Oct 2014
This command shows the distributions that are available:
>> makedist
ans =
'beta'
...
'weibull'
It also takes an argument that asks MATLAB go to out and look again. So if you have introduced a new distribution class using the prob.XXX convention you mention, it should find the new distribution:
>> makedist -reset
>> makedist
ans =
'beta'
...
'laplace' <-- the new one I added
...
'weibull'

Community Treasure Hunt

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

Start Hunting!

Translated by