Hello,
I have an observation with two text fields that contain listings of error keys.
I need to convert these fields into two vectors the have a zero/one indicator for each error key. I then need to be able to perform some basic matrix algebra on the vectors and store the results (a numeric value) in a third picture.
EXAMPLE
Field 1: “112 1454 122 342”
Field 2: “122 1343 32”
Key for Vector Element 112 1454 122 342 1343 32
Field 1 Vector: 1 1 1 1 0 0
Field 2 Vector: 0 0 1 0 1 1
This is essentially a numerical application of the Salton Wong and Yang (1975) vector space model.
Does anyone have any code handy to do this, or can anyone point me to resources where I can learn it myself? I've been struggling to find stuff.
Thank you all!