Skip to content

Algorithm

Masso edited this page Mar 7, 2023 · 2 revisions

Predict

To predict an entity, a formula is used that first takes the items in common using intercession, then divides by the size of items in the pattern. Thus returning a percentage related to similarity.

len(pattern.intersection(input)) / len(pattern)

After having similarity, it is filtered by the acceptable value to be similar and it is placed in a similarity list. After that, this list goes through an orderer that returns the highest similarity.

Clone this wiki locally