Coder Social home page Coder Social logo

Unsupervised GraphSAGE 结果 about pgl HOT 4 CLOSED

paddlepaddle avatar paddlepaddle commented on September 16, 2024
Unsupervised GraphSAGE 结果

from pgl.

Comments (4)

kirayummy avatar kirayummy commented on September 16, 2024

"python train.py --data_path ./sample.txt --num_nodes 2000 --phase predict"

  1. 这里指定了 num_nodes为2000,表示节点数最大为2000,Embedding空间由这个数来定义大小
  2. sample.txt指定的是边的src和dst,保证index在2000以内即可

所以即使没在sample.txt出现的id,也会初始化一个随机Embedding,作为一个孤立的点存在,不参与模型训练。

from pgl.

zhuchuanshuai avatar zhuchuanshuai commented on September 16, 2024
  1. 第n行的embedding结果对应id=n的embedding对吧?
  2. 怎么加入节点特征?

from pgl.

zhuchuanshuai avatar zhuchuanshuai commented on September 16, 2024
  1. 怎么使用边的权重?

from pgl.

githubutilities avatar githubutilities commented on September 16, 2024
  1. 第n行的embedding结果对应id=n-1的embedding,id是从0开始编号的
  2. 节点特征需要两个步骤:
    1. 在pgl.graph_wrapper.GraphWrapper里面给定参数node_feat,例如:node_feat为[('index', [-1, 1], np.dtype('int64'))]'index'为node_feat名字,[-1, 1]为node_feat的shape,np.dtype('int64')为node_feat的类型
    2. reader.py里面的subgraph把node_feat挂载上去,例如:subgraph.node_feat["index"] = np.array([1,2,3], dtype="int64")
  3. 暂时不支持边权重采样

from pgl.

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.