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

validation question #19

Closed
namasang1 opened this issue Feb 14, 2022 · 1 comment
Closed

validation question #19

namasang1 opened this issue Feb 14, 2022 · 1 comment

Comments

@namasang1
Copy link

namasang1 commented Feb 14, 2022

hello, I read your paper interestingly and want to apply it to my custom data.
In this regard, two problems occurred.

first, when i evaluate my custom data, i can suffer this error
1
do you know what is?

And can i extract each prediction results, not average prediction result?.

thank you

@kaiwenzha
Copy link
Collaborator

kaiwenzha commented Feb 20, 2022

Hi @namasang1 Thanks for your interest. It seems that the error was raised because the low_shot_gmean list is empty, which indicates that there is no low-shot label under the current low shot threshold. You may change the many/medium/few shot thresholds (check many_shot_thr and few_shot_thr parameters in the following code) according to your data.

def shot_metrics(preds, labels, train_labels, many_shot_thr=100, low_shot_thr=20):

Sure, you can extract each prediction result without averaging. preds in the following code is a list that saves all the prediction results. You can directly use it without applying shot_metrics() function to get averaged results.

shot_dict = shot_metrics(np.hstack(preds), np.hstack(labels), train_labels)

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

3 participants