Git Product home page Git Product logo

Comments (5)

abojchevski avatar abojchevski commented on September 1, 2024 1

Hi,

I will look into my logs and try to find the exact hyperparameters we used for that experiment. In the meantime, can you please share the relevant code snippet that you ran?

I just ran the following:

g = load_dataset('data/citeseer.npz')
A, X, z = g['A'], g['X'], g['z']

g2g = Graph2Gauss(A=A, X=X, L=64, verbose=True, p_val=0.10, p_test=0.0, p_nodes=0.1)
sess = g2g.train()
ind_auc, ind_ap = score_link_prediction(g2g.ind_ground_truth,
                                        sess.run(g2g.neg_ind_energy, g2g.ind_feed_dict))
print('ind_auc: {:.4f}, ind_ap: {:.4f}'.format(ind_auc, ind_ap))

and obtained:

ind_auc: 0.9071, ind_ap: 0.8126

from graph2gauss.

abojchevski avatar abojchevski commented on September 1, 2024

That's right. I'll update the code to include an inductive variant in the coming days. In the meantime, replacing self.X with a placeholder should be an effective solution.

from graph2gauss.

abojchevski avatar abojchevski commented on September 1, 2024

Hi,

I added some code enabling the evaluation of the inductive variant. Here's a short example snippet:

from g2g.model import Graph2Gauss
from g2g.utils import load_dataset, score_link_prediction

g = load_dataset('data/cora_ml.npz')
A, X, z = g['A'], g['X'], g['z']

g2g = Graph2Gauss(A=A, X=X, L=64, verbose=True, p_val=0.10, p_test=0.05, p_nodes=0.1)
sess = g2g.train()
ind_auc, ind_ap = score_link_prediction(g2g.ind_ground_truth,
                                        sess.run(g2g.neg_ind_energy, g2g.ind_feed_dict))
print('ind_auc: {:.4f}, ind_ap: {:.4f}'.format(ind_auc, ind_ap))

The parameter p_nodes specifies the percentage of nodes to hide for inductive evaluation.

You might get ... UserWarning: Converting sparse IndexedSlices ... warning when using the inductive variant. At the moment there is no clean way to avoid this.

from graph2gauss.

svjan5 avatar svjan5 commented on September 1, 2024

Hi,
We are not able to reproduce your results on the inductive setting (with p_nodes = 0.1) using the default hyperparameters. We obtained AUC of 75.7 on citeseer as opposed to 88.58 reported in the paper. Could you please let us know what configuration you ran with.

Thanks in advance

from graph2gauss.

svjan5 avatar svjan5 commented on September 1, 2024

Thanks a lot, there was some mistake from our end. The above sample gave the reported results.

from graph2gauss.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.