Quick question about truth values

49 views
Skip to first unread message

Subhashree S cs13d029

unread,
Nov 9, 2020, 4:36:17 PM11/9/20
to PSL Users
Hi

Should all the truth values be probabilities? 
If yes, then how to convert values which are not inherently between 0 to 1 into probability values? For eg. LESK similarity measure between 2 words does not fall between 0 and 1. In case I define a predicate LESK_similarity(A, B), then how should I convert this similarity value into a probability? I want to keep this as a closed predicate and use it for inferring something else. Is there a standard normalization technique used for such cases?


Alexander Miller

unread,
Nov 10, 2020, 11:43:00 PM11/10/20
to PSL Users
Values in PSL don't need to be probabilities, but they do need to be in [0, 1]. There's no one-size-fits all way to normalize values into [0, 1]; it really depends on the situation. This isn't exhaustive list, but some ways people normalize values include dividing them all by the maximum observed value, or dividing them all by a value smaller than that and clipping the results into [0, 1].

An example that's similar to what you mention is the use of normalized Levenshtein similarity between strings, which is based on their Levenshtein distance. For two strings s1 and s2, normalized Levenshtein similarity is defined as:
(1 - (Levenshtein_distance(s1, s2)/max(length(s1), length(s2))

Because the Levenshtein distance between s1 and s2 will never be greater than the length of the longer string, this value falls into [0, 1] and can be used in a PSL program even though it isn't a probability.

I hope this helped, feel free to ask any followup questions.

Subhashree S cs13d029

unread,
Nov 11, 2020, 4:49:24 AM11/11/20
to PSL Users
That was an elaborate explanation! Thanks a ton!
Reply all
Reply to author
Forward
0 new messages