-
Notifications
You must be signed in to change notification settings - Fork 15
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
ndcg_array = dcg_array / dcg_max_array #10
Comments
It sounds like some of the values in dcg_max_array are zero or NaN. Can you please wrap the |
Yes alpha_ndcg_array = np.zeros(shape=(2,)) I did also the same for ndcg_max_array , I got no error henlo and nothing else. Did i do something wrong ? Thanks |
Hi, I double-checked the code. The script works even some of the values are zeros, it will just print out a warning, but not an error. The |
I fixed that by what i told you in the last comment I also would like to know where i can find the scores for the evaluation ? Thanks |
Yes, I know, but my point is the division by zero is just a warning, but not an error, it will not cause the script to terminate, and the NaN value will be corrected by |
Thank you very much , yes , you are right , those were just warning I am computing the scores in for word_inspec test set prediction I used this comman to compute the prediction -pred_file_path pred/predict.kp20k.one2many.cat.copy.bi-directional.20191212-151234/predictions.txt -trg_file_path data/cross_domain_sorted/word_inspec_testing_allkeywords.txt -src_file_path data/cross_domain_sorted/word_inspec_testing_context.txt -exp kp20k -export_filtered_pred -disable_extra_one_word_filter -invalidate_unk -all_ks 5 M -present_ks 5 M -absent_ks 5 M In this results file, Can you please explain it. I saw it dived to all, present, absent and MAE stat. Can you explain for example the one for Present and where exactly the final F1@5, F1@M and alph-nDCG@5 for present keyphrase. And what is Micro and Macro mean. Thanks I appreciated your help |
Hi, the results under |
Yes I understood that but what I did not understand is that for example for present keyphrases I found two F1@5 ==================================present==================================== |
Hi, we report the macro F1 scores in our paper since they are used by previous keyphrase generation literature. Macro F1 scores and micro F1 scores are two different ways to aggregate the F1 score of each individual test sample into one score. You can check the following two urls for the details. http://rushdishams.blogspot.com/2011/08/micro-and-macro-average-of-precision.html |
Hello Kenchan I have another question,I would to ask when we are the prediction using this command 👍 catSeq on inspec dataset: python3 interactive_predict.py -vocab data/kp20k_sorted/ -src_file data/cross_domain_sorted/word_inspec_testing_context.txt -pred_path pred/%s.%s -copy_attention -one2many -one2many_mode 1 -model [path_to_model] -max_length 60 -remove_title_eos -n_best 1 -max_eos_per_output_seq 1 -beam_size 1 -batch_size 20 -replace_unk why we shall pass the dateset itself -vocab data/kp20k_sorted/ in that command . I think it should be enough to pass the model and the Test data set only , So Could you please explain me more why it is necessary? |
Our source code separately save the word2idx and idx2word dictionary in the vocab.pt, they are not inside our saved model, so we still need to load it. |
Thanks for your reply , I would like to know if your source code is saving word2idx and idx2word during the training of the model? |
word2idx and idx2word are saved by the preprocessing scripts. |
predict.txt can you run |
Hello
i would like to know after we use the command for computing the evaluation scores on prediction files there is any explanation for that ?
I got that erros
RuntimeWarning: invalid value encountered in true_divide
ndcg_array = dcg_array / dcg_max_array
RuntimeWarning: invalid value encountered in true_divide
alpha_ndcg_array = alpha_dcg_array / alpha_dcg_max_array
henlo
henlo
henlo
Thanks
The text was updated successfully, but these errors were encountered: