algorithm - Is there a standard approach to find related/similar objects? -
suppose have set of entities (for illustration people physical characteristics) , want find, given entity x, entities related (or similar) it, definition of similarity.
i can find such entities 1 dimension (all people height y ~= x's height within threshold) there approach can utilize find similar entities considering more 1 attribute?
it going depend on define similarity, can utilize same approach take 1d, dimension, little generalization. assuming each element represented vector, can measure distance of 2 vectors x,y
d=|x-y|
, , accept/reject depending on d
, threshold.
in here, minus operator vector negation: (a1,a2,...,an)-(b1,b2,...,bn)=(a1-b1,a2-b2,...,an-bn)
and absolute value 1 time again vectors: |(a1,a2,...,an)| = sqrt(a1^2 + a2^2 + ... + an^2)
.
it easy see generalization of 1d example, , invoking same approach vectors single element same.
downside of approach (0,0,0,...,0,10^20)
, (0,0,0,....,0)
far away each other - might or might not after, , might need different distance metric - depends on after.
algorithm similarity correlated
No comments:
Post a Comment