Here is the sample data I have:
Tag 1(Val: X), Tag 2(Val: Y), Tag 3(Val: Z), Label (Val: P)
Tag 1(Val: A), Tag 2(Val: B), Tag 3(Val: C), Label (Val: Q)
Tag 1(Val: D), Tag 2(Val: E), Tag 3(Val: F), Label (Val: R)
Tag 1(Val: G), Tag 2(Val: H), Tag 3(Val: I), Label (Val: S)
All the values are strings and I need to encode them into vectors for training ML models using this data. How do I make sure that the strings are always converted to the "same" vectors everytime? I notice that when I try a test input with the same value as the training data, it gets vectorized into a different integer. What is the standard procedure for preserving the mapping between String <--> Hashed Integer representation so that i get the same hash everytime?