benedekrozemberczki / karateclub

Karate Club: An API Oriented Open-source Python Framework for Unsupervised Learning on Graphs (CIKM 2020)

Home Page:https://karateclub.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph2Vec Error

rodrigo-arenas opened this issue · comments

Hi, I'm trying to use Graph2Vec with a simple DiGraph but I'm getting an error; I'm quite new to the package so I'm not sure if I'm doing something wrong.
I'm using networkx version 2.6.3 and karateclub 1.3.0

import networkx as nx
from karateclub.graph_embedding import Graph2Vec

edge_list = [('A', 'B'), ('B', 'C'), ('C', 'D'), ('D', 'J'),
             ('D', 'I'), ('J', 'I'), ('I', 'F'), ('I', 'E'),
             ('I', 'L'), ('F', 'D'), ('E', 'K'), ('K', 'I'), ('L', 'M')]

G = nx.DiGraph()
for edge in edge_list:
    G.add_edge(*edge)

graph_vect = Graph2Vec()
graph_vect.fit([G])

I get the following error:
image

Alright, thanks