Code Monkey home page Code Monkey logo

Comments (4)

migalkin avatar migalkin commented on June 17, 2024 1

Indeed, that's not consistent with the OG implementation, anchors after argpartition() should be further sorted by distance. iirc, @mberr went for argpartition for efficiency reasons, though adding a sorting on top of the output should be a negligible compute effort

from pykeen.

mberr avatar mberr commented on June 17, 2024

Hi @martytom ,

indeed it looks like the CSGraphAnchorSearcher computes the k-closest anchor nodes, but does not guarantee any order between them:

return torch.as_tensor(
numpy.argpartition(distances, kth=min(k, distances.shape[0] - 1), axis=0)[:k, :].T,
dtype=torch.long,
)

I do not remember whether this was an explicit choice, but @migalkin may be able to tell whether this is consistent with the NodePiece reference implementation / paper version 😉

from pykeen.

mberr avatar mberr commented on June 17, 2024

@migalkin I opened a PR to fix this: #1318 🙂

from pykeen.

mberr avatar mberr commented on June 17, 2024

@martytom , the issue has been fixed with #1318 ; until our next release, you need to install from source to get access to it, cf. https://github.com/pykeen/pykeen#installation--

from pykeen.

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.