Overlap Coefficient

May 28, 2014 at 7:01 PM
According to the Wikipedia link you gave for Overlap Coefficient, if either set is a complete subset of the other, the coefficient should be 1. That does not appear to be represented in this code.

Thanks.
May 28, 2014 at 10:17 PM
Edited May 28, 2014 at 10:20 PM
An update to this.

In looking at your code,

Intersect provides only DISTINCT characters in string. For example, the following code:

string sStringA = "CHRIS KNOWLES";
string sStringB = "CHRIS KNOWLES";

sStringA.Intersect(sStringB) yields
"C", "H", "R", "I", "S", "K", "N", "O", "W", "L", "E", " "
so
sStringA.Intersect(sStringB).Count() yields 12 - MIN of the lengths of the source strings is 13.

Which never lets you get to the subset containment rule because you never get a length equal unless all of the characters in the compared sets are distinct ... highly unlikely.