## 4 Fairness-Aware Machine Learning Based Power and RB Allocation with Multiple Relays
### Relays Deployment and Users Association  
In this section, we present an autonomous unsupervised machine learning scheme that provides users association with optimally deployed relay nodes in the cell-edge area. Machine learning algorithms can broadly be divided into two main categories, namely supervised learning and unsupervised learning algorithms. The former class of algorithms learn by training on the input labeled examples, called training dataset, \(\{(x^{(1)},y^{(1)}),(x^{(2)},y^{(2)}),(x^{(3)},y^{(3)}),...,(x^{(m)},y^{(m)})\}\), where the \(i^{th}\) example \((x^{(i)},y^{(i)})\) consists of the \(i^{th}\) instance of feature vector \(x^{(i)}\) and the corresponding label \(y^{(i)}\). Given a labeled training dataset, these algorithms try to find the decision boundary that separates the positive and negative labeled examples by fitting a hypothesis to the input dataset. Unsupervised machine learning algorithms, on the other hand, are given an unlabeled input dataset. These algorithms are used for extracting information or features from the dataset. These features might be related, but not confined, to the underlying structures or patterns in the input data, relationships in data items, grouping/clustering of data items, etc. Discovered features are meant to provide a deeper insight into the input dataset that can subsequently be exploited for achieving specific goals. Clustering algorithms make an important part of unsupervised learning where the input examples are grouped into two or more separate clusters based on some features. The K-Means (KM) algorithm, is probably the most popular clustering algorithm. It is an iterative algorithm that starts with a set of initial centroids given to it as input. During each iteration, it performs the following two steps. 1. **Assign Cluster:** For every user, the algorithm computes the distance between the user and every centroid. The user is then associated to the cluster with the closest centroid. During this step, a user might change its association from one cluster to another one. 2. **Recompute centroids:** Once all users have been associated to their respective cluster, the new position of centroid for every cluster is then calculated. Figure 8: Block diagram of machine learning based resource and power allocation. Figure 7: LTE-A Network with Multiple L3 Relays. Let us define the following notations to be used later in this section. \[K = \text{Total number of clusters being formed}.\] \[x^{(i)} = \text{Location coordinates of user }u^{(i)}.\text{ In our case, }x^{(i)}\in\mathbb{R}^{2}\] \[c^{(i)} = \text{Cluster to which the user }u^{(i)}\text{ is currently associated}.\] \[\mu_{k} = \text{Centroid of }k^{th}\text{ cluster, }\mu_{k}\in\mathbb{R}^{2}\] \[\mu_{c^{(i)}} = \text{Centroid of the cluster to which the user }u^{(i)}\text{ is currently associated}.\]  
Now the cost function \(J\) can be defined as  
\[J(c^{(1)},c^{(2)},...,c^{(m)},\mu_{1},\mu_{2},\ldots,\mu_{K})=\frac{1}{m}\sum_{ i=1}^{m}||x^{(i)}-u_{(c^{i})}||^{2} \tag{22}\]  
with the following optimization objective function. \[\min_{c^{(1)},...,c^{(m)},\mu_{1},\ldots,\mu_{K}}J(c^{(1)},c^{(2)},...,c^{(m)},\mu_{1},\mu_{2},\ldots,\mu_{K})\]  
It may be pointed out that Equation (22) allows us to compare multiple clustering layouts based on their cost and select the one with the lowest cost. In this section, we use the KM algorithm for optimal clustering of \(m\) users competing for resources in a particular cell. The clustering is performed based on their geographic location, thus our input dataset \(\{u^{(1)},u^{(2)},u^{(3)},...,u^{(m)}\}\) has \(m\) vectors \(u^{(i)},\quad 1\leq i\leq m\), consisting of location coordinates, of \(i\)th user. For the sake of simplicity, we assume these users are deployed in a two dimensional area, i.e., a plane and so \(u^{(i)}=(x_{1}^{(i)},x_{2}^{(i)})\), i.e., an ordered pair of location coordinates. Our clustering algorithm is summarized in Algorithm 2.