# Should I create metafeatures for my XGBoost training set?

Say I've got two (not necessarily independent) features A and B for my dataset. Should I create metafeatures from them? say for example the ratio: $$\frac{A}{B}$$

You should think about the physical meaning of each proposed metafeature, and whether it's relevant to the problem at hand. For example, suppose you're interested in patient temperature. You might add in $$height^2$$ and $$height^3$$, as they are roughly proportional to surface area (through which patient loses heat to a cool environment) and proportional to volume (tissue respirating to generate heat). Of course, you might choose to discard that last one as silly if patient $$weight$$ is part of your dataset. If your subjects are mammals ranging from mouse up to elephant, that cubic entry might still hold some predictive power.
• No. Inferring a ratio or a cubic relationship, or a relationship among two or three noisy variables, is not what a technique like XGBoost is good at. For an even harder example, consider a task like classifying positive profit = revenue - cost, or profit = revenue - (rent + tax). – J_H Dec 15 '18 at 12:44