pygod icon indicating copy to clipboard operation
pygod copied to clipboard

About node embedding function

Open wubo2180 opened this issue 3 years ago • 2 comments

Hi, could you please provide the function that returns the trained node embeddings so that I can input the embeddings to machine learning classifier such as SVM.

Best wish!

wubo2180 avatar Jul 10 '22 09:07 wubo2180

Hi! Thanks for your issue. Maybe we can add a parameter (e.g., model, emb = model.fit(G, return_emb=True)) for AE-based detectors in future version. Does it look good to you?

kayzliu avatar Jul 11 '22 22:07 kayzliu

Thanks a lot! That is what I expect.

wubo2180 avatar Jul 12 '22 08:07 wubo2180

The input data embedding is now available for deep learning based methods via detector.emb. During inference, you can also retrieve the embedding by red, emb = detector.predict(test_data, return_emb=True)

kayzliu avatar May 12 '23 03:05 kayzliu