Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples of vector X and Y #18

Open
Pryanic opened this issue Jan 30, 2019 · 8 comments
Open

Examples of vector X and Y #18

Pryanic opened this issue Jan 30, 2019 · 8 comments

Comments

@Pryanic
Copy link

Pryanic commented Jan 30, 2019

Thank you for you code. But sorry, I don't understand how to use it. Could you please explain how to set up data for training in vector X and Y? Could you please provide more details?

@whuissyxa
Copy link

Hello, I have the same question. Have you got it?

@speeding-motor
Copy link

@whuissyxa I have the same question too , have you got it?

@shiba24
Copy link
Owner

shiba24 commented Aug 7, 2019

It's on README. https://github.com/shiba24/learning2rank#usage

X is numpy array with the shape of (num_samples, num_features) and y is numpy array with the shape of (num_samples, ). y is the score which you would like to rank based on (e.g., Sales of the products, page view, etc).

if you have any further questions, feel free to post it here.
@jiasudemotuohe

@Royisaboy
Copy link

no qid/ group id is required?

@shmed
Copy link

shmed commented Apr 9, 2020

@shiba24 , I'm also interested in the answer to the question @Royisaboy is asking. How can we do "listwise" training without being able to specify lists? Are we supposed to call "fit" multiple times in a row for all the lists we have? Or is it meant to be trained on a single very long list? Thank you

@ahkimkoo
Copy link

我也有疑问,希望能给出示例,谢谢。

@Xinyu-Wu
Copy link

I have the same question. And I have read README.

Model.fit(X, y)
Here, X is numpy array with the shape of (num_samples, num_features) and y is numpy array with the shape of (num_samples, ). y is the score which you would like to rank based on (e.g., Sales of the products, page view, etc).

In my recommendation system, I got a recommended list. And I want to re-rank the list by adding more info. But I don't understand the data format of X, y in your code.

Can I directly set X with N_features, and y with only probabilities (such as 0/1), if the data is not divided into groups. Thank you.

@wangzhiying-maomao
Copy link

@shiba24, I have a question : Each problem has several documents. Does X contain all the document features of a problem, or can it contain all the document features of all problems? That is to say, when you train, do you just train one problem at a time or do you train all problems together. What would the X form look like if we could train it together. Suppose I now have two questions, qid1 contains four documents, each with a feature, and qid2 contains three documents, can I type X and y like this? X = np. Array ([[[1], [2], [3], [4]], [[2], [3], [5]]]), y = np. Array ([,2,1,1 [2], [1 0]])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants