# Indoor Localization Using Semi-Supervised Manifold Alignment with Dimension Expansion
## 3 Algorithm Description
### Manifold Alignment with Dimension Expansion  
Let \(\mathbf{X}=\left\{\mathbf{x}_{i}\right\}\) and \(\mathbf{Y}\mathbf{=}\left\{\mathbf{y}_{i}\right\}(1\leq i,j\leq l)\) be the manifolds corresponding to the augmented physical coordinates and the corresponding RSS measurements, respectively. Here, the augmented physical coordinates and the corresponding RSS measurements are two different types of measurements. Then, the objective function in the proposed manifold alignment for indoor localization is constructed as:  
\[ \begin{split}\arg\min\
olimits_{\mathbf{X},\mathbf{Y}}\{& \sum\limits_{i\in\{1,2,...,l\}}\left(||\mathbf{x}_{i}-\mathbf{y}_{i}||^{2} \right)+\sum\limits_{i,i^{\prime}\in\{1,2,...,l\}}\left(||\mathbf{x}_{i}- \mathbf{x}_{i^{\prime}}||^{2}S^{x}_{ii^{\prime}}\right)+\\ &\sum\limits_{j,i^{\prime}\in\{1,2,...,l\}}\left(||\mathbf{y}_{j} -\mathbf{y}_{j^{\prime}}||^{2}S^{y}_{jj^{\prime}}\right)\}\end{split}  \tag{1}\]  
where \(S^{x}_{ii^{\prime}}=e^{-||\mathbf{h}_{i}-\mathbf{h}_{j^{\prime}}||^{2}}\) and \(S^{y}_{jj^{\prime}}=e^{-||\mathbf{g}_{j}-\mathbf{g}_{j^{\prime}}||^{2}}\); \(\mathbf{h}_{i}\) and \(\mathbf{g}_{j}\) stand for the \(i\)-th augmented physical coordinate and \(j\)-th RSS measurement, respectively; and the notation \"\(||\bullet||^{\prime}\) represents the two-norm operation. In (1), the first term is to guarantee that the manifolds corresponding to the augmented physical coordinates and the corresponding RSS measurements can be well aligned, while the second and third terms are to preserve the neighborhood relations of the augmented physical coordinates and the corresponding RSS measurements at nearby locations, respectively. Since the manifolds \(\mathbf{X}\) and \(\mathbf{Y}\) are obtained from the transformation of the augmented physical coordinates and the corresponding RSS measurements, we can convert the objective function into the one by optimizing the transformation matrices with respect to the augmented physical coordinates and the corresponding RSS measurements, \(\mathbf{P}_{x}\) and \(\mathbf{P}_{y}\), such that:  
\[\begin{split}\arg\min\
olimits_{\mathbf{P}_{x},\mathbf{P}_{y}}\{ \sum\limits_{i\in\{1,2,...,l\}}\left(||\mathbf{P}_{x}{}^{\text{T}}\mathbf{h}_{i }-\mathbf{PSince:  
\[\sum_{i\in\{1,2,\ldots,l\}}||\mathbf{P}_{x}{}^{\mathrm{T}}\mathbf{h}_{i}-\mathbf{ P}_{y}{}^{\mathrm{T}}\mathbf{g}_{i}||^{2}=\mathrm{Tr}(\mathbf{P}_{x}{}^{\mathrm{T}} \mathbf{H}\mathbf{H}^{\mathrm{T}}\mathbf{P}_{x}+\mathbf{P}_{y}{}^{\mathrm{T}} \mathbf{G}\mathbf{G}^{\mathrm{T}}\mathbf{P}_{y}-\mathbf{P}_{x}{}^{\mathrm{T}} \mathbf{H}\mathbf{G}^{\mathrm{T}}\mathbf{P}_{y}-\mathbf{P}_{y}{}^{\mathrm{T}} \mathbf{G}\mathbf{H}^{\mathrm{T}}\mathbf{P}_{x}), \tag{3}\]  
\[\sum_{i,l^{\prime}\in\{1,2,\ldots,l\}}\left(||\mathbf{P}_{x}{}^{\mathrm{T}} \mathbf{h}_{i}-\mathbf{P}_{x}{}^{\mathrm{T}}\mathbf{h}_{l^{\prime}}||^{2}S_{ii ^{\prime}}^{x}\right)=2\mathrm{Tr}(\mathbf{P}_{x}{}^{\mathrm{T}}\mathbf{H} \mathbf{L}_{x}\mathbf{H}^{\mathrm{T}}\mathbf{P}_{x}), \tag{4}\]  
and:  
\[\sum_{j,l^{\prime}\in\{1,2,\ldots,l\}}\left(||\mathbf{P}_{y}{}^{\mathrm{T}} \mathbf{g}_{j}-\mathbf{P}_{y}{}^{\mathrm{T}}\mathbf{g}_{l^{\prime}}||^{2}S_{ jj^{\prime}}^{y}\right)=2\mathrm{Tr}(\mathbf{P}_{y}{}^{\mathrm{T}}\mathbf{G} \mathbf{L}_{y}\mathbf{G}^{\mathrm{T}}\mathbf{P}_{y}), \tag{5}\]  
where the notation \"\(\mathrm{Tr}(\bullet)\)\" represents the trace of the matrix; \(\mathbf{L}_{x}=\mathbf{D}^{x}-\mathbf{S}^{x}\) and \(\mathbf{L}_{y}=\mathbf{D}^{y}-\mathbf{S}^{y}\); \(\mathbf{S}^{x}=\left\{S_{ii^{\prime}}^{x}\right\}\) and \(\mathbf{S}^{y}=\left\{S_{jj^{\prime}}^{y}\right\}\); and \(\mathbf{D}^{x}=\left\{D_{ii^{\prime}}^{x}\right\}\) and \(\mathbf{D}^{y}=\left\{D_{jj^{\prime}}^{y}\right\}\) are the diagonal matrices satisfying \(D_{ii}^{x}=\sum_{l^{\prime}=1}^{x}S_{ii^{\prime}}^{x}\) and \(D_{jj}^{y}=\sum_{l^{\prime}=1}^{y}S_{jj^{\prime}}^{y}\), respectively; we can convert (2) into:  
\[