Skip to content

Different Scores in CudaCosineGreedy and CosineGreedy #6

@lewisgeng

Description

@lewisgeng

Hi SimMS Teams,

I met an issue when I trying to use MatchMS and SimMS, the code here

scores = calculate_scores(sp_list, sp_list, CudaCosineGreedy())
selected_scores = scores.scores_by_query(sp_list[-1], 'CudaCosineGreedy_score', sort=True)
print([float(x[1][0].round(3)) for x in selected_scores])

the result is a list:
[0.0010000000474974513, 0.0010000000474974513, 0.0010000000474974513, 0.0010000000474974513, 0.0010000000474974513.....]

But when I use CosineGreedy function in the same code:
scores = calculate_scores(sp_list, sp_list1, CosineGreedy())
selected_scores = scores.scores_by_query(sp_list[-1], 'CosineGreedy_score', sort=True)
print([float(x[1][0].round(3)) for x in selected_scores])

the result is a lit:
[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0......]

I believe the CosineGreedy result is correct as the sp_list just include ONE same spectrum so the compare score should be 1.0.

Any Comments?

Thanks,
LV.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions