logarithmic binning data in matlab
5 ビュー (過去 30 日間)
古いコメントを表示
I have a dataset, and I have been told to bin the data using logarithmic binning.
How would I go about logarithmic binning this dataset?
0 件のコメント
回答 (1 件)
John D'Errico
2022 年 4 月 6 日
編集済み: John D'Errico
2022 年 4 月 6 日
It is not clear what you mean by logarithmic binning.
Looking at your data however, tells me that you were told to do something that makes no sense at all.
min(Q)
ans =
-4.77253376114796
max(Q)
ans =
47.6051494981383
mode(Q)
ans =
0
sum(Q == 0)
ans =
22891
numel(Q)
ans =
57158
So your data goes from negative to positive values, but there is a HUGE spike at EXACTLY 0. Literally half of your data is EXACTLY zero. Not just close. But EXACTLY so.
histogram(Q,1000)
Sorry. In no circumstances would any sort of traditional logarithmic binning like that make sense. And that HUGE spike at 0 makes things almost impossible to work with.
Could you choose bins that grow in size, as you move away from zero, in BOTH directions? Well, yes.
I would recommend you return to whoever told you to do this, and show them your actual data. Then ask them SPECIFICALLY what they think you should do. Don't just let them tell you to do something by some vague name. Have them tell you explicitly what they think is appropriate here.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Get Started with Statistics and Machine Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!