Ejemplo n.º 1
0
 def test_membership(self):
     mapper = KeplerMapper(verbose=0)
     data = np.random.rand(100, 2)
     graph = mapper.map(data)
     n, m = list(graph["nodes"].items())[0]
     g = to_networkx(graph)
     assert g.nodes[n]["membership"] == m
Ejemplo n.º 2
0
    def test_convertions(self):
        mapper = KeplerMapper(verbose=0)
        data = np.random.rand(100, 2)
        graph = mapper.map(data)

        g = to_networkx(graph)
        assert isinstance(g, nx.Graph)
Ejemplo n.º 3
0
 def test_nx_input(self, mapper):
     draw_matplotlib(km.to_networkx(mapper))