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: 3
Non-data size: 9
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: 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: SheffieldML/GPy
Commit Name: 6aca7c2765ef4e81d93e929510d12778a5ed5331
Time: 2015-03-02
Author: michael.p.croucher@googlemail.com
File Name: GPy/core/parameterization/index_operations.py
Class Name: ParameterIndexOperationsView
Method Name: items