featuretools
featuretools copied to clipboard
Allow relationships to be given custom names
This could be useful when there are multiple relationships between two entities. For example:
games.home_team_id -> teams.id
games.away_team_id -> teams.id
Currently we disambiguate by using the child_variable_id
, generating features with names like the following
Forward:
teams[home_team_id].MEAN(...)
teams[away_team_id].MEAN(...)
Backward:
MEAN(games[home_team_id].home_score)
MEAN(games[away_team_id].away_score)
It would be clearer if each direction of each relationship had its own name, allowing the above to be rendered as
Forward:
home_team.MEAN(...)
away_team.MEAN(...)
Backward:
MEAN(home_games.home_score)
MEAN(away_games.away_score)
We could allow names like this to be specified through an API like the following:
relationship.rename(parent_name='home_team', child_name='home_games')
The above situation may not be common enough to make this enhancement worthwhile – further discussion is needed.
See #543