Discretization in R

Does anyone know of a package that implements a controlled learning algorithm for sampling continuous variables?

The dprep package contains functions along this line, but the package is deprecated. Any ideas?

Thanks for your help!

+6
source share
2 answers

You can still use the dprep package, but you need to install it from the source (I just tested it and it works well). However, you can take a look at discretization or infotheo packages that provide similar functions, such as equal interval width, equal frequency intervals, ChiMerge, etc.

+7
source

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
source

Source: https://habr.com/ru/post/888055/


All Articles