:ranked by - how it works


I was wondering if someone could expand on this function. Seems powerful on the face of things but how does it measure similarities?

Has anyone got a working example or could explain below in more detail?

:ranked by…
This lets you rank a list of things by how similar or how different they are from a target element (which should be of the same type). This can be used if you want to match people for a dating app, for instance.

It sums the square of the difference of each fields between two objects. So if thing 1 has a field a at 5 and b at 2 and thing 2 has a at 1 and b at 7, the “difference” is

(5 - 1)^2 + (2 -7)^2

That’s a fairly standard way to quantify how different two things are. Works for number fields obviously not text.


Hi, I know this thread is old but I just released a new plugin that implements AI based on the Graph Theory to give you recommendations based on usage patterns in your app. It’s very easy to use also !

It serves as a good alternative to the Rank by Similarity vanilla functionality.

Take a look:

Nice Bubbling!

Is it possible to get the “sum of the difference” (the result of your calculation) as a number?