Skip to content

Turn continuous data into discrete data for analysis.

License

Notifications You must be signed in to change notification settings

Nectarineimp/Binning.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binning.jl Helper functions to pre-process continuous data by quantizing it into discrete bins.

With binning, continuous data is fit to finite sized ranges, we call bins, that allow for groups of points to be handled discretely. There is some data loss, but we accept that data loss by gaining the ability to do further analysis. How the bins are set is important. If bins are set up incorrectly it may be very difficult to get useful results. For example, if your data has a strong left or right bias, the majority of the data may end up in one or two bins. This library has flexible bin widths. You can set your own exactly as you like, or you can use the included methods to set equal distance bins, equal frequency bins, as well as left tailed and right tailed bins.

rn = randn(1000)
bi = Binning.binindex(rn, equaldistancelimits(rn, 11))
support = binsupport(bi, 1:11)
xvals = map(x->first(x), support)
yvals = map(x->last(x), support)

About

Turn continuous data into discrete data for analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages