b52e083827ce7aefda75c4370db0ad6942e27dae,stellar/mapper/node_mappers.py,HinSAGENodeMapper,__getitem__,#HinSAGENodeMapper#Any#,355
Before Change
head_nodes = self.ids[start_idx:end_idx]
// Get batch targets - if given
if self.target_data is not None:
batch_targets = self.target_data[start_idx:end_idx]
else:
batch_targets = None
// Get sampling schema for head nodes
After Change
]
// Get features
batch_feats = [
self.graph.get_feature_for_nodes(layer_nodes, nt)
for nt, layer_nodes in nodes_by_type
]
// Resize features to (batch_size, n_neighbours, feature_size)
batch_feats = [
np.reshape(a, (len(head_nodes), -1 if np.size(a) > 0 else 0, a.shape[1]))
for a in batch_feats
]
return batch_feats, batch_targets
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 12
Instances Project Name: stellargraph/stellargraph
Commit Name: b52e083827ce7aefda75c4370db0ad6942e27dae
Time: 2018-08-12
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: HinSAGENodeMapper
Method Name: __getitem__
Project Name: stellargraph/stellargraph
Commit Name: 33ee48fe46e47492c4f9ff173771dcad51304fe9
Time: 2018-08-20
Author: yuriy.tyshetskiy@data61.csiro.au
File Name: stellar/mapper/link_mappers.py
Class Name: HinSAGELinkMapper
Method Name: _get_features
Project Name: stellargraph/stellargraph
Commit Name: b52e083827ce7aefda75c4370db0ad6942e27dae
Time: 2018-08-12
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: HinSAGENodeMapper
Method Name: __getitem__
Project Name: stellargraph/stellargraph
Commit Name: b52e083827ce7aefda75c4370db0ad6942e27dae
Time: 2018-08-12
Author: docherty@gmail.com
File Name: stellar/mapper/node_mappers.py
Class Name: GraphSAGENodeMapper
Method Name: __getitem__