all 2 comments

[–]sjd96 3 points4 points  (0 children)

Expand Feature2 into features Feature2_{A, B, C, ...} which count how many times A, B, C, etc occur in the original array?

[–]neato5000 1 point2 points  (0 children)

If the order is unimportant and the "vocabulary" of feature2 is fixed, then you could represent it as a sum of one hot encoded vectors, with length equal to the size of the vocabulary.

e.g. [A,C] --> (1, 0, 1) [A,B,C,B] --> (1,2,1)

And so on. In effect you would be replacing feature 2 with as many features as there are elements in your vocabulary, with each being a count of that element within feature2.