function [sim] = simLin(probAintersectB, probAnotB, probBnotA) % Lin's method % (formula derived in Information-theoretic and Set-theoretic % Similarity - Cazzanti and Gupta) % Input: % 1. probAintersectB: probability of observing AintersectB % 2. probAnotB: probability of observing AnotB % 3. probBnotA: probability of observing BnotA % Output: % 1. similarity value calculated using Lin's method % Note: alpha = 1, beta = 0.5, gamma = 0.5 sumLogIntersect = log(probAintersectB); sumLogAnotB = log(probAnotB); sumLogBnotA = log(probBnotA); %disp(sumLogIntersect); %disp(sumLogAnotB); %disp(sumLogBnotA); sim = sumLogIntersect ./(sumLogIntersect + 0.5.*sumLogAnotB + 0.5.*sumLogBnotA);