skip to Main Content

I have a few one hot vectors(more than 2) of size 48 each. How can I add them? Is there any specific method or simple arithmetic addition? If arithmetic addition then how should I handle the carry bit?

I know this may be a very basic question but I am new to the field of Artificial Intelligence and need help.

2

Answers


  1. Chosen as BEST ANSWER

    Well adding one hot vector isn't a usual practice. It is exclusively task centric. I was dealing with timeseries data when posted this question.

    Suppose you have three one hot vectors [0,1,0,0], [1,0,0,0] and [0,1,0,0]. The addition process that I followed was to add these vectors in bit-wise fashion i.e [0+1+0, 1+0+1, 0+0+0, 0+0+0]. The resultant vector would be [1,2,0,0].

    However, the major concern (with very large numbers of vectors) is the case when the addition produces a carry. In such a case, one may simply treat the two (or three) digit number as one i.e. [12,2,0,100].

    PS: This is a highly data-centric approach. There may exists better proposals.


  2. One hot vectors are basically vectors. To the same summation applies to them ,which applies to normal vectors.

    To add or subtract two vectors, add or subtract the corresponding components.

    Let u=⟨u1,u2⟩ and v =⟨v1,v2⟩ be two vectors.
    Then, the sum of u and v is the vector

    u+v=⟨u1+v1,u2+v2⟩

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search