A discretizer may be trained from one RDD but applied to another. I would recommend separating `Discretizer` from data by having a `train` method that takes an RDD as input and a `discretize` method to discretize an RDD of the same element type/dimension.