You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on implementing CategoricalNB for river and i would like to understand what's the best approach for encoding categorical values (Ordinal or One Hot or etc). Below I've considered the following data sample:
After performing one hot encoding, I have the following:
Currently, I have the following hierarchy to store the count of target class values c associated with each feature i with category t in a dictionary (according to sklearn's categoricalNB as follows:
{"feature" :
{"category" :
{"class": count } } }
My Question: Is the first level of hierarchy ('feature') necessary in order to store the count of each categorical value in the dictionary? or Should I just eliminate the first level and maintain a "category" -> "class" -> count hierarchy?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've been working on implementing CategoricalNB for river and i would like to understand what's the best approach for encoding categorical values (Ordinal or One Hot or etc). Below I've considered the following data sample:
After performing one hot encoding, I have the following:
Currently, I have the following hierarchy to store the count of target class values c associated with each feature i with category t in a dictionary (according to sklearn's categoricalNB as follows:
{"feature" :
{"category" :
{"class": count } } }
My Question: Is the first level of hierarchy ('feature') necessary in order to store the count of each categorical value in the dictionary? or Should I just eliminate the first level and maintain a "category" -> "class" -> count hierarchy?
Beta Was this translation helpful? Give feedback.
All reactions