We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Calculate cosine simialrity between vector embeddings

warrencowan
9 - Comet

Hi wiser people

 

I have 2 tables of embeddings, table 1 is list of terms, and table 2 is a list of categories. Like this

embeds.png

 

I want to take a row from the terms list, and score its embedding against a list of embeddings in the categories table using a cosine simialrity calculation. I can join the table data together, but dont know how to implement the calc.

Anyone know how to implement that kind of calc in Alteryx?

 

Many thnx in advance.

 

w

4 REPLIES 4
OllieClarke
15 - Aurora
15 - Aurora

Hi @warrencowan 

Not an expert, but based on the formula described here this is how I'd do this:
image.png

The first bit is structuring the data as a paired list:
image.png

From there its fairly simple :)

 

Hope that helps,

 

Ollie

warrencowan
9 - Comet

thnks @OllieClarke for this detailed overview. let me give it a try. much appreciated.

warrencowan
9 - Comet

thnx @OllieClarke thats a sweet little solution there.

you're a 🔷

OllieClarke
15 - Aurora
15 - Aurora

@warrencowan Happy to help :)

Labels
Top Solution Authors