MCPcopy
hub / github.com/dmlc/dgl / test_mask_nodes_by_property

Function test_mask_nodes_by_property

tests/python/common/data/test_utils.py:75–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73)
74@unittest.skipIf(dgl.backend.backend_name == "mxnet", reason="Skip MXNet")
75def test_mask_nodes_by_property():
76 num_nodes = 1000
77 property_values = np.random.uniform(size=num_nodes)
78 part_ratios = [0.3, 0.1, 0.1, 0.3, 0.2]
79 split_masks = data.utils.mask_nodes_by_property(
80 property_values, part_ratios
81 )
82 assert "in_valid_mask" in split_masks
83
84
85@unittest.skipIf(

Callers 1

test_utils.pyFile · 0.85

Calls 1

uniformMethod · 0.80

Tested by

no test coverage detected