There are various feature encoding methods.

https://www.youtube.com/watch?v=kGemHLOEF3w