开发者

Discretization in R

开发者 https://www.devze.com 2023-03-05 13:25 出处:网络
Is anyone aware of a packag开发者_如何学Pythone that implements a supervised learning algorithm for the discretization of continuous variables?

Is anyone aware of a packag开发者_如何学Pythone that implements a supervised learning algorithm for the discretization of continuous variables?

The dprep package contained functions along this line, but the package has been deprecated. Any ideas?

Thanks for your help!


You can still use the dprep package, but you have to install it from source (I just tested and it works well). However, you may well have a look at the discretization or infotheo packages which provide similar functionalities, e.g. equal interval width, equal frequency intervals, ChiMerge, etc.


A simple example using infotheo

> set.seed(1)
> infotheo::discretize(rnorm(10))
   X
1  1
2  1
3  1
4  2
5  2
6  1
7  2
8  2
9  2
10 1
0

精彩评论

暂无评论...
验证码 换一张
取 消