class TestHistogramOptimBinNums:
Method | test_empty |
Undocumented |
Method | test_incorrect_methods |
Check a Value Error is thrown when an unknown string is passed in |
Method | test_limited_variance |
Check when IQR is 0, but variance exists, we return the sturges value and not the fd value. |
Method | test_novariance |
Check that methods handle no variance in data Primarily for Scott and FD as the SD and IQR are both 0 in this case |
Method | test_outlier |
Check the FD, Scott and Doane with outliers. |
Method | test_scott_vs_stone |
Verify that Scott's rule and Stone's rule converges for normally distributed data |
Method | test_signed_integer_data |
Undocumented |
Method | test_simple |
Straightforward testing with a mixture of linspace data (for consistency). All test values have been precomputed and the values shouldn't change |
Method | test_simple_range |
No summary |
Method | test_simple_weighted |
Check that weighted data raises a TypeError |
Method | test_small |
Smaller datasets have the potential to cause issues with the data adaptive methods, especially the FD method. All bin numbers have been precalculated. |
Check the FD, Scott and Doane with outliers.
The FD estimates a smaller binwidth since it's less affected by outliers. Since the range is so (artificially) large, this means more bins, most of which will be empty, but the data of interest usually is unaffected. The Scott estimator is more affected and returns fewer bins, despite most of the variance being in one area of the data. The Doane estimator lies somewhere between the other two.
Undocumented