Feature Engineering for Channel Allocation
Planning, Dynamics & Decision Systems DS practice problem on Onlearn.
Difficulty: medium.
Topics: Feature Engineering for Channel Allocation, Principal Component Analysis, Hamilton-Jacobi-Bellman Equation, Fast Fourier Transform, Knapsack Problem Formulation, Kullback-Leibler Divergence, Statistical Learning Theory, Control Theory, Signal Processing, Combinatorial Optimization, Information Theory, Dimensionality Reduction, Stochastic Optimal Control, Spectral Analysis, Resource Allocation Algorithms, Entropy Estimation.
In reinforcement learning for dynamic channel allocation problems (such as wireless communication networks), the raw state is typically a binary occupancy matrix showing which channels are in use at which cells. To use function approximation methods, we need to extract meaningful features from this raw state. Implement a function that takes a channel allocation state and cell adjacency information, and produces a feature vector suitable for RL value function approximation. The state is a binary matrix of shape (n cells, n channels) where 1 indicates a channel is in use. The adjacency matrix of shape (n cells, n cells) indicates which cells are neighbors (the diagonal is always 0). Your function should compute the following feature groups in this order : 1. Cell utilization (n cells features): For each cell, the fraction of its channels currently in use. 2. Neighbor average utilization (n cells features): For each cell, the mean utilization of its neighboring cells. If a cell has no neighbors, this value is 0. 3. Channel conflict ratio (n cells features): For each cell, the fraction of its in use channels that are also in use by at least one neighbor. If a cell has no neighbors, this is 0. 4. Jointly available channel ratio (n cells features): For each cell, the fraction of channels that are free in this cell AND free in ALL of its neighbors simultaneously. If a cell has no neighbors, count channels free in the cell only. 5. Global statistics (3 features): The overall utilization across all cells, the maximum cell utilization, and the minimum cell utilization. The total feature vector length is 4 n cells + 3. Args: state: A list of lists of shape (n cells, n channels), binary values adjacency: A list of lists of shape (n cells, n cells), binary adjacency matrix Return the feature vector as a list of floats.