Automatically fitting distribution to histogram

7 vues (au cours des 30 derniers jours)
Sepp
Sepp le 29 Fév 2016
Modifié(e) : Image Analyst le 29 Fév 2016
Hello
I have a histogram plot of one feature (machine learning). That mean on the x-axis I have several value the feature can take and on the y-axis I have the number of occurences.
Is it possible in Matlab to automatically fit a probability distribution to this histogram if I don't know which type of distribution it is (normal distribution or geometric distribution etc.)? That means Matlab should figure out which distribution it is and give me the optimal parameters.
The problem is that I have a lot of features and manually inspecting the features takes too much time.

Réponse acceptée

Image Analyst
Image Analyst le 29 Fév 2016
You can try all the distributions that fitdist() offers you and find which one has the lowest MSE or MAD.
  7 commentaires
Sepp
Sepp le 29 Fév 2016
Modifié(e) : Sepp le 29 Fév 2016
Thanks a lot. Is normalization required before searching the best fitting distribution?
And a last small question: If I would like to create a histogram of values (that means the empirical distribution), how should I choose the bin width?
Image Analyst
Image Analyst le 29 Fév 2016
Modifié(e) : Image Analyst le 29 Fév 2016
No, only if you want the area under the curve to be 1, like it would for a regular probability density function.
The bin width depends on what kind of resolution you want in the x direction. You might not want to do so many bins that each bin has only 1 or 0 counts in it, but other than that, it's up to you.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by