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

Interpreting output #6

Open
Chandrak1907 opened this issue Jan 8, 2020 · 2 comments
Open

Interpreting output #6

Chandrak1907 opened this issue Jan 8, 2020 · 2 comments

Comments

@Chandrak1907
Copy link

How to interpret the output? I am confused with continuous value output.

from semantic_text_similarity.models import WebBertSimilarity
from semantic_text_similarity.models import ClinicalBertSimilarity
web_model = WebBertSimilarity(device='cpu', batch_size=10) #defaults to GPU prediction
clinical_model = ClinicalBertSimilarity(device='cuda', batch_size=10) #defaults to GPU prediction
web_model = WebBertSimilarity(device='cuda', batch_size=10) #defaults to GPU prediction
web_model.predict([("She won an olympic gold medal","The women is an olympic champion")])
array([3.0079894], dtype=float32)
web_model.predict([("I am King","I am king")])
array([4.5483], dtype=float32)
web_model.predict([("I am King","I am not king")])
array([3.6953335], dtype=float32)
web_model.predict([("I am King","I am queen")])
array([4.31337], dtype=float32)

@AndriyMulyar
Copy link
Owner

AndriyMulyar commented Jan 8, 2020 via email

@magneticnorth
Copy link

Please can you help us to understand the scores returned for exact matches? They seem to be in the 4-5 range but do not ever reach 5.

web_model.predict([("drones","drones")])
array([4.1196394], dtype=float32)
web_model.predict([("I love to draw graphs","I love to draw graphs")])
array([4.710452], dtype=float32)
web_model.predict([("data quality","data quality")])
array([4.539741], dtype=float32)
web_model.predict([("motorcycle","motorcycle")])
array([4.4404535], dtype=float32)

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