6

Is anyone aware of a package 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!

Jason
  • 63
  • 1
  • 5

2 Answers2

7

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.

chl
  • 27,771
  • 5
  • 51
  • 71
0

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
Adriano Rivolli
  • 2,048
  • 1
  • 13
  • 13