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

Which loss functions are suitable for sentence ordering? #45

Open
ghost opened this issue Jun 11, 2022 · 1 comment
Open

Which loss functions are suitable for sentence ordering? #45

ghost opened this issue Jun 11, 2022 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 11, 2022

Given the features are tokenized sentences, and the targets y_pred are normalized rankings. A typical model accepts tokenized sentences as inputs and outputs their order/ranks.

`x`: tokenize(['sentence 1', 'sentence 2', 'sentence 3', 'sentence 4'])
`y_true`: [0., 0.33333333, 0.66666667, 1.]

Which of the loss function implementations is suitable for this kind of data?

@PrzemekPobrotyn
Copy link
Contributor

If I understood your setup correctly I think all implemented loss functions should work. Depending if you choose pointwise/ pairwise or listwise loss you predict the normalised ranking directly / compare two sentences and learn to order them correctly / learn to order the entire list at once, respectively

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

1 participant