Create Composite Hypervector for a Dataset Row

Representation Learning, Advanced Theory & Miscellaneous DS practice problem on Onlearn.

Difficulty: medium.

Topics: Understanding Create Composite Hypervector for a Dataset Row, Circular Convolution, Permutation Encoding, Majority Rule Bundling, Orthogonal Basis Generation, Hamming Distance Metric, Hyperdimensional Computing, Representation Learning, Information Theory, Vector Space Models, Probabilistic Computing, Vector Binding Operations, Dimensionality Reduction, Symbolic Representation, Random Projection, Associative Memory.

Task: Generate a Composite Hypervector Using Hyperdimensional Computing Your task is to implement the function create row hv(row, dim, random seeds) to generate a composite hypervector for a given dataset row using Hyperdimensional Computing (HDC). Each feature in the row is represented by binding hypervectors for the feature name and its value. The hypervectors for the values are created using the same feature seed provided in the random seeds dictionary to ensure reproducibility. All feature hypervectors are then bundled to create a composite hypervector for the row. Input: row: A dictionary representing a dataset row, where keys are feature names and values are their corresponding values. dim: The dimensionality of the hypervectors. random seeds: A dictionary where keys are feature names and values are seeds to ensure reproducibility of hypervectors. Output: A composite hypervector representing the entire row.