Git Product home page Git Product logo

Comments (5)

ChandlerBang avatar ChandlerBang commented on July 17, 2024

Hi,

The input adjacency matrix already contains the injected nodes. Please see the file below.

def init_setup():
data = Dataset(root='/tmp/', name=args.dataset, setting='nettack')
injecting_nodes(data)

from deeprobust.

mmdhhhh avatar mmdhhhh commented on July 17, 2024

Thank you very much for your answer!
The input adjacency matrix does indeed include injection nodes, but at this point, the degree of the injected nodes is 0 because the injection nodes have not yet been connected to the nodes in the original graph (the "injecting_nodes" function in the "deeprobust/examples/graph/test_nipa. py" file seems to have only changed the shape of the initial adjacency matrix). However, the variable "N" in the "deeprobust/graph/rl/nipa_env. py" file represents the number of nodes with a degree greater than 0, which is the number of nodes in the original graph (the degree of all nodes in the graph I chose to attack is greater than 0), and the variable "self. all_nodes" should represent the index of all nodes in the original graph. I also debugged the code, which confirms my point.
PF$YVT){2DA3EP @5S_YL
In the above figure, I printed the shapes of the feature matrices before and after injecting nodes. Before injecting nodes, the number of nodes was 2708, and after injecting nodes, the number of nodes was 2735. Therefore, the index of the injected nodes should be 2708-2734. However, I checked the index stored in the variable "self.injected_nodes" in the "deeprobust/graph/rl/nipa_env. py" file, and it looks like this:
R$ XZ}9 @YGOROQQ 4K_X2P
The value of the variable "self.injected_nodes" is actually stored between 2681 and 2707.
I hope you can check it out and correct me if I'm wrong.

from deeprobust.

mmdhhhh avatar mmdhhhh commented on July 17, 2024

Hi,

The input adjacency matrix already contains the injected nodes. Please see the file below.

def init_setup():
data = Dataset(root='/tmp/', name=args.dataset, setting='nettack')
injecting_nodes(data)

Hi,

The input adjacency matrix already contains the injected nodes. Please see the file below.

def init_setup():
data = Dataset(root='/tmp/', name=args.dataset, setting='nettack')
injecting_nodes(data)

Hello, could you please reply to me?

from deeprobust.

ChandlerBang avatar ChandlerBang commented on July 17, 2024

Hi mmdhhhh,

Thank you for pointing out. I agree that there is a bug in this file. Can you help me fix this issue and submit a pull request to this repo? I appreciate your help.

from deeprobust.

mmdhhhh avatar mmdhhhh commented on July 17, 2024

Thank you for your answer!
I will submit a pull request soon.

from deeprobust.

Related Issues (20)

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.