Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can an id be encoded as a feature for a neural network?

Say for example each user has their own unique model, say for example a users music taste. Sure I could encode generic features of their taste, but I want it to be truly specific and personalized per user. However, rather than making N different models, I encode N as a feature to my model, (0->N). E.g:

age, eye color, time of day, user_id

Lets say for now, I'm working with a neural network. Thoughts on whether a the user_id would be enough of a feature to produce different results for each user?

like image 526
carboncomputed Avatar asked Nov 02 '25 04:11

carboncomputed


1 Answers

Definitely! This is exactly what you can use one-hot encoding for. However, this means you will have N extra inputs (where N is the amount of users).

If you have three users, the extra input to your model would look like this:

user1: 001
user2: 010
user3: 100

enter image description here


However, if you are running neural computations for a lot of users, you should probably use a network that is indifferent to the user ID (even though you said you didn't want that). Maybe look at some kind of recurrent network (LSTM).

like image 109
Thomas Wagenaar Avatar answered Nov 04 '25 08:11

Thomas Wagenaar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!