def _build_graph_instance(self, y):
    edge_map = self.graph_builder.transform(y)
    g = gt.Graph(directed=False)
    g.add_vertex(y.shape[1])
    self.weights_ = g.new_edge_property('double')
    for (edge, weight) in edge_map.items():
        e = g.add_edge(edge[0], edge[1])
        self.weights_[e] = weight
    self.graph_ = g
def _build_graph_instance(self, y):
    edge_map = self.graph_builder.transform(y)
    g = gt.Graph(directed=False)
    g.add_vertex(y.shape[1])
    self.weights_ = g.new_edge_property('double')
    for (edge, weight) in edge_map.items():
        e = g.add_edge(edge[0], edge[1])
        self.weights_[e] = weight
    self.graph_ = g