Giter VIP home page Giter VIP logo

Comments (2)

nextxyz avatar nextxyz commented on August 19, 2024

check your input file which is HIN format. This code regards the graphs as directed graphs basically. If you want the un-directed graphs, you have to write the two edges to your input text file.

from hin2vec.

e-yi avatar e-yi commented on August 19, 2024

你需要检查生成的随机游走文件中是否缺失特定节点并找出原因,我记得随机游走是会将所有节点作为起点运行至少一次的。

另外这里有一个bug,你可以检查一下边权重有没有低于0.1的。这种边不会被随机游走采样到,所以如果一个节点相关联的所有边权重都低于0.1那么节点就不会被采样到。最简单的解决方案是https://github.com/csiesheep/hin2vec/blob/master/ds/network.py#L282

node_choices[from_id] += [(to_id, edge_id)] * int(w*10)

修改常数10,比如改成100,这样权重为0.01的边就会被记录下来。

from hin2vec.

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.