321a0f455524b7553a66ff229f8b4c02c40a5fda,featuretools/entityset/entityset.py,EntitySet,get_backward_entities,#EntitySet#Any#Any#,441
Before Change
Returns:
Set of each :class:`.Entity` in a backward relationship.
children = [r.child_entity.id for r in
self.get_backward_relationships(entity_id)]
if deep:
children_deep = set([])
for p in children:
children_deep.add(p)
to_add = self.get_backward_entities(p, deep=True)
children_deep = children_deep.union(to_add)
children = children_deep
return set(children)
def get_forward_relationships(self, entity_id):
Get relationships where entity "entity_id" is the child
After Change
Yields a tuple of (descendent_id, path from entity_id to descendant).
for relationship in self.get_backward_relationships(entity_id):
child_eid = relationship.child_entity.id
direct_path = RelationshipPath([(False, relationship)])
yield child_eid, direct_path
if deep:
sub_entities = self.get_backward_entities(child_eid, deep=True)
for sub_eid, path in sub_entities:
yield sub_eid, direct_path + path
def get_forward_relationships(self, entity_id):
Get relationships where entity "entity_id" is the child
Args:
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 8
Instances Project Name: Featuretools/featuretools
Commit Name: 321a0f455524b7553a66ff229f8b4c02c40a5fda
Time: 2019-06-21
Author: chrisstadler@gmail.com
File Name: featuretools/entityset/entityset.py
Class Name: EntitySet
Method Name: get_backward_entities
Project Name: estnltk/estnltk
Commit Name: 18ac84177e0905c92b87efa5ba9ad515e125bb0d
Time: 2015-06-03
Author: tpetmanson@gmail.com
File Name: estnltk/dividing.py
Class Name:
Method Name: lists_collect_spans
Project Name: Featuretools/featuretools
Commit Name: 321a0f455524b7553a66ff229f8b4c02c40a5fda
Time: 2019-06-21
Author: chrisstadler@gmail.com
File Name: featuretools/entityset/entityset.py
Class Name: EntitySet
Method Name: get_forward_entities
Project Name: estnltk/estnltk
Commit Name: 18ac84177e0905c92b87efa5ba9ad515e125bb0d
Time: 2015-06-03
Author: tpetmanson@gmail.com
File Name: estnltk/dividing.py
Class Name:
Method Name: lists_collect_lists