GithubHelp home page GithubHelp logo

Comments (6)

Edward-Sun avatar Edward-Sun commented on July 24, 2024

Hi,

You can follow this nice script to split test data into 1-to-1, 1-to-N, N-to-1, and N-to-N: https://github.com/thunlp/OpenKE/blob/OpenKE-PyTorch/benchmarks/FB15K/n-n.py
And set them as your test data.

For prediction head and prediction tail, you can set use test_dataset_list to [test_dataloader_head] or [test_dataloader_tail].

from knowledgegraphembedding.

MuhibKhan avatar MuhibKhan commented on July 24, 2024

Hello. I used the script and create the text files of 1-to-1, 1-to-N, N-to-1, and N-to-N. Where I apply this, will you please elaborate it:

prediction head and prediction tail, you can set use test_dataset_list to [test_dataloader_head] or [test_dataloader_tail]?

Head and tail as (test_dataloader_head and test_dataloader_tail) are not in a separate files, so where I can find it?

from knowledgegraphembedding.

Edward-Sun avatar Edward-Sun commented on July 24, 2024

Hi,
You can

use test_dataloader_head + 1-to-1 and test_dataloader_tail+ 1-to-1 to evaluate 1-to-1 in prediction head and prediction tail,

use test_dataloader_head + 1-to-N and test_dataloader_tail+ N-to-1 to evaluate 1-to-N in prediction head and prediction tail,

use test_dataloader_head + N-to-1 and test_dataloader_tail+ 1-to-N to evaluate N-to-1 in prediction head and prediction tail,

and use use test_dataloader_head + N-to-N and test_dataloader_tail+ N-to-N to evaluate N-to-1 in prediction head and prediction tail.

Therefore, to get all 8 evaluation scores in this table, you will need to run the model for 8 times.

from knowledgegraphembedding.

MuhibKhan avatar MuhibKhan commented on July 24, 2024

I understand a bit but having one confusion. what is test_dataloader_head and test_dataloader_tail?

Where I can find it? or I have to create it from train2id by separating all heads and tails?

from knowledgegraphembedding.

Edward-Sun avatar Edward-Sun commented on July 24, 2024

Hi, it's in this line:

test_dataset_list = [test_dataloader_head, test_dataloader_tail]

from knowledgegraphembedding.

MuhibKhan avatar MuhibKhan commented on July 24, 2024

@Edward-Sun Thanks Sir.

from knowledgegraphembedding.

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.