I want to discretize a continuous variable $X$ into a given number of classes $k$ (assume for simplicity that $k$ is even).
Decision trees (and related methods) are already used to discretize a variable in a supervised context, but I find nothing regarding decision trees in an unsupervised context (in the sense of Kohavi et al.). The idea is simply to build a regression tree model where the target and the input are the same, i.e. $y=X$. This should result in subgroups (from which I derive the classes) which maximize the between-group variance.
Yet, I feel like I'm missing something obvious since the method is not being used anywhere. The module sklearn.preprocessing
proposes methods based on K-means, on the distribution of the variable, on the range of the variable but nothing regarding decision trees.
Edit. Here is an example : Suppose I'm trying to predict the popularity of a set of articles for a press company. The popularity is captured by the number of shares on social networks, so it's a continuous variable. The company wants me to discretize the number of shares in order to get 4 classes (from very popular to not popular at all) before moving on to prediction because it is more readable from a business point of view. Can decision trees be of any help in achieving this goal?