程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

Custom binning boundary to approach Gaussian histogram

发布于2024-10-31 20:32     阅读(526)     评论(0)     点赞(12)     收藏(4)


I'd like to compute custom bin edges so that the new histogram shape will approach Gaussian. Think of the shape you'll get after Box-Cox transformation, but I want to keep the original values.

These new bin edges will be fed into histplot or distplot in python. I've read of qcut but that will make the shape approaching uniform distribution.

Example in chart below :

  1. Bins could be 0-2, 2-30, 30-50, etc.
  2. Or keep 0 apart as it's outlier. Bins then could be 0, 1-10, 10-25, etc. How would you modify approach to skip 0 in the calculation of new bin edges ?

Surprisingly I have not been able to find a solution for python.

The closest question is in Matlab Specifying bin edges when fitting a normal distribution using histfit

enter image description here


解决方案


暂无回答



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:https://www.pythonheidong.com/blog/article/2040404/1c0e9868b8a85bbc285c/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

12 0
收藏该文
已收藏

评论内容:(最多支持255个字符)