You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My advice is to encode the text with a label encoder like this:
le = LabelEncoder()
le.fit(df.stack().unique())
# save label encoder
np.save('label_encoder.npy', le)
df['source'] = le.transform(df['source'])
df['destination'] = le.transform(df['destination'])
then
le = np.load('label_encoder.npy', allow_pickle=True).tolist()
# get node_id
le.transform([node_name])[0]
# get node name
le.inverse_transform([node_id])[0]
Chinese characters represent nodes, and numbers represent weights.Has anyone done a similar experiment? Ask for advice
The text was updated successfully, but these errors were encountered: