Conditional attributes in a prediction problem I am trying to implement an algorithm to predict fantasy points of a player regarding past events. However, I am having some doubts about some attributes.
Imagine that a player is going to play away in the next match, I believe it is useful to have the points/goals he did in the past away matches to evaluate how well he performs away from his stadium. However, that same attribute would not be useful if the next match is at home. The same with the % of occupation of the stadium - it is important when a player plays at home but not relevant when he plays away.
What is the best approach to this kind of scenario? Do I put the away goals anyway even when the match is at home?

Regards
Decision trees can handle conditions based on several features by design: if the model determines that the feature "at home" is important for the prediction, it will create a node based on this condition close to the root of the tree. By construction other features will appear as conjuncts, e.g. "if at-home==true and featureX==valueX and ... then predict ..." (that's just how a decision tree works).

In case you consider that this particular feature is so important that everything else should depend on it, another option is to train two distinct models: one for "at home" and one for "away". The disadvantage is that a model can only use the instances relevant for its case, so there is less training data for each of them.