Comparison Between Features for Random Forest or Decision Tree In the random forest of sklearn package, will there be some relationships among features?
For example: if value(feature_1) > value(feature_2); it is category A, else B.
I read some materials online, it seems there will only be the absolute value comparison.
For example: if value(feature_1) > 1 and value(feature_2) > 3; then it is category A, else B.
 A: Random Forest uses Decision Trees under the hood and existing commonly known algorithms (e.g. ID3, C4.5, CART) doesn't compare features with other features. Specifically, scikit-learn uses CART algorithm which doesn't do what you want. The only available option is to compare the numeric feature with a real number. Moreover, it would be computationally hard to add this capability if we wanted to do so, since we then need to consider all the possible feature combinations to compare (which is quadratic in number of features) in addition to all possible thresholds.
A: a < b is a - b < 0 so why don't you generate a new feature feature1_feature2_diff = norm(feature_1) - norm(feature_2) and let the decision tree decide if it should do feature1_feature2_diff < 0 or not?
Edit: if there is some sort of window aggregation involved, say a moving average, you need to use a value within that window to normalize your aggregated data. Otherwise the new feature might vary over time and there will be too much noise, lowering the information gain from it.
