Closed kinkunchan closed 3 years ago
Thanks for the suggestion.
Typically self.predict()
is used by self.test()
where we do not specify the arguments features
and adj
. If you hope to pass some features, adj
pair into the function, you can do it outside the predict()
as follows,
prediction1 = model.predict()
processed_adj = model.truncatedSVD(perturbed_adj, k=20)
# prediction2 is the same as prediction1
prediction2 = model.predict(features, processed_adj)
Similarly we can do that in GCNJaccard. I think I am going to keep the original version of predict()
. Thank you again for your suggestions and feel free to let me know if you have other concerns.
@ChandlerBang I see your point, but I would still vote to include an overridden version of the predict
function for GCNSVD, just to keep the consistency of interfaces among different models. If kept unchanged, users using the predict()
function for GCNSVD may think they are getting predictions on the GCNSVD, but in fact they are getting results from GCN
.
@jiong-zhu Yeah, that makes sense. I've updated the code as you suggested to avoid confusion. See details in commit https://github.com/DSE-MSU/DeepRobust/commit/000f86d124f75ce3b21e47588a79ffe24fb94bf7. Thank you for the advice, Jiong and Mark!
Thank you!
As GCNSVD model will process the input adjacency matrix using
truncatedSVD()
, we cannot directly use thepredict()
function inherited fromGCN
.This is my personal implementation,