phanein / deepwalk

DeepWalk - Deep Learning for Graphs
http://www.perozzi.net/projects/deepwalk/
Other
2.68k stars 826 forks source link

How to apply deepwalk on features only? #102

Closed Abhinav43 closed 4 years ago

Abhinav43 commented 5 years ago

Hi, I want to apply deepwalk on MNIST dataset, How can I apply deepwalk on those datasets which contains only features like X = 1708 x 738 here 1708 are nodes and 738 are features

Can I apply deepwalk on that?

Thank you

GTmac commented 5 years ago

Essentially you are looking for dimension reduction algorithms that reduce from 1708 738 to 1708 d where d << 738.

In this sense, DeepWalk can be think of as a dimension reduction algorithm that works on a specific type of data, i. e. graph data. So you can apply DeepWalk by constructing a graph between your examples -- for example, the KNN graph and then run DeepWalk on it. But I am not sure if that will be better than just applying dimension reduction algorithms on your original data.

Abhinav43 commented 5 years ago

Thank you for reply, I am not looking for dimension reduction, I am looking for clustering via deepwalk on mnist dataset. How can I apply that?

GTmac commented 5 years ago

Now the question is, why it would be better than clustering using the original features?

Abhinav43 commented 5 years ago

Yes, I want to use original features of mnist to cluster, but I want to use deepwalk just for experiment purpose.

On Mon, Oct 7, 2019, 9:14 PM Haochen Chen notifications@github.com wrote:

Now the question is, why it would be better than clustering using the original features?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phanein/deepwalk/issues/102?email_source=notifications&email_token=ALXYSOYOH67P5HK44VLBCWTQNNKPVA5CNFSM4I54XYNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAQ2RVY#issuecomment-539076823, or mute the thread https://github.com/notifications/unsubscribe-auth/ALXYSO4KZLK2AK3MOGF244DQNNKPVANCNFSM4I54XYNA .

GTmac commented 5 years ago

I see, in this case maybe you can try the KNN idea above? (Constructing the KNN graph between examples and run DeepWalk on that)

Abhinav43 commented 5 years ago

Surez but how to feed the input? What is input format for deepwalk?

On Mon, Oct 7, 2019, 10:22 PM Haochen Chen notifications@github.com wrote:

I see, in this case do you think the KNN idea above is good? (Constructing the KNN graph between examples and run DeepWalk on that)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/phanein/deepwalk/issues/102?email_source=notifications&email_token=ALXYSOYQG2TMKVJF65WDFZ3QNNSNDA5CNFSM4I54XYNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEARBPUQ#issuecomment-539105234, or mute the thread https://github.com/notifications/unsubscribe-auth/ALXYSO6U2TCLWBVYEOVMKRTQNNSNDANCNFSM4I54XYNA .

GTmac commented 5 years ago

The KNN graph is just like the other graphs we are using here, so you can represent it as a list of edges. Nodes are your examples and edges are example pairs with "distance" smaller than a threshold.