-
Notifications
You must be signed in to change notification settings - Fork 16
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
Getting nan score for spec2vec_similarity function #87
Comments
This could be multiple things. Usually I would expect the score to be 0 if something went wrong. How dit you get |
Here is the code I used to calculate the similarity score for two files containing 5 spectra (just for test): def calculate_similarity_spec2vec (ref_file, query_file, model_file):
scores is ndarray with shape(5,5) containing 'nan' valuse. |
I learned this issue happened because there is low similarity between spectra so the missing_percentage is bigger than allowed_missing_percentage in _check_model_coverage function. For example, for the files that I tested the calculated missing percentage was around 86 so I set allowed_missing_percentage to 88, but it calculated high similarity scores which is not correct: |
Hi,
Using two similarity functions to compute similarity scores between spectra of two files:
However, I've got nan scores for spec2vec that I think it's because of low similarity between pairs of spectra.
for example: the results of similarity functions between two spectra
Reference scan id: F1:2478
Query scan id: 3350
Score: [nan]
Reference scan id: F1:2478
Query scan id: 3850
Score: [0.004275957907034389, 4]
I tried to change the allowed missing percentage from 5 to higher value but it didn't work.
Could you please tell me how I can get a score rather than nan by applying spec2vec similarity function?
Thanks!
The text was updated successfully, but these errors were encountered: