Create an MDL Instance.
Create an MDL Instance.
percentage of records to keep to compute the buckets
stopping criterion for MDL
minimum percent of total data allowed in a single bin
maximum number of thresholds per feature
seed for the sampler
Create a new MDL from a settings object
Create a new MDL from a settings object
Settings object
Transform a column of continuous labelled features to n columns of binned categorical features. The optimum number of bins is computed using Minimum Description Length (MDL), which is an entropy measurement between the values and the targets.
The transformer expects an MDLRecord where the first field is a label and the second value is the scalar that will be transformed into buckets.
MDL is an iterative algorithm so all of the data needed to compute the buckets will be pulled into memory. If you run into memory issues the
sampleRate
parameter should be lowered.References:
- Fayyad, U., & Irani, K. (1993). "Multi-interval discretization of continuous-valued attributes for classification learning."
- https://github.com/sramirez/spark-MDLP-discretization