Questions tagged [multi-hot-encoding]
3 questions
2
votes
1 answer
Explanation of tf.keras.layers.CategoryEncoding output_mode='multi_hot' behavior
Question
Please help understand the definition of multi hot encoding of tf.keras.layers.CategoryEncoding and the behavior of output_mode='multi_hot'.
Background
According to What exactly is multi-hot encoding and how is it different from…

mon
- 18,789
- 22
- 112
- 205
0
votes
0 answers
Multi Hot Encoding Dask Array
Right now I'm performing multi hot encoding in vanilla numpy but I'd like to port the code to dask.
import numpy as np
data = np.array([
[1, 4, 77, 87, 100, 101, 102, 121],
[12, 41, 58, 67, 81, 84, 96, 111],
[31, 33, 35, 50, 60, 70, 92,…

S1M0N38
- 131
- 2
- 10
0
votes
1 answer
How to do Multi-hot Encoding but with actual values instead of ones
I am able to perform a Multi-hot encoding of ratings to movies by:
from sklearn.preprocessing import MultiLabelBinarizer
def multihot_encode(actual_values, ordered_possible_values) -> np.array:
""" Converts a categorical feature with multiple…

Michael
- 325
- 3
- 14