## 2 High Dimensional \(\ell_{1}\) Major Component Detection and Analysis (MCDA)
### Calculation of the Major Directions and Median Radii in those Directions  
The \"major directions\" are the directions in which the multidimensional distribution locally spreads farthest. We measure this spread by the \"median radius\" in each direction. To be more precise, assume that \(f(r|\boldsymbol{\theta})\) is the conditional probability density function of radius \(r\) in the given direction \(\boldsymbol{\theta}\). The median radius in the direction \(\boldsymbol{\theta}\) is defined as the median of \(f(r|\boldsymbol{\theta})\), _i.e._, the value of \(r^{*}(\boldsymbol{\theta})\) such that \(\int_{0}^{r^{*}(\boldsymbol{\theta})}f(r|\boldsymbol{\theta})dr/\int_{0}^{+ \infty}f(r|\boldsymbol{\theta})dr=0.5\). According to this definition, a direction \(\hat{\boldsymbol{\theta}}\) is one major direction if \(r^{*}(\hat{\boldsymbol{\theta}})\) is a local maximum in the angular space \(\boldsymbol{\theta}\). For a finite sample, the median radius in a given direction is estimated by the two-level median of the sample points over a small angular neighborhood around that direction. The details about the two-level median estimation will be described in the following algorithm. The algorithm for calculating the major directions and median radii in those directions is described as follows:  
1. For \(m=0,\cdots,M-1\), transform \(\bar{\mathbf{x}}_{m}=(\bar{x}_{m}^{1},\bar{x}_{m}^{2},\cdots,\bar{x}_{m}^{n})\) into \"polar\" form by the relations \[\bar{r}_{m}=\sqrt{(\bar{x}_{m})^{2}+\cdots+(\bar{x}_{m}^{n})^{2}}\] (2) \[\bar{\theta}_{m}^{i}=\frac{\bar{x}_{m}^{i}}{\bar{r}_{m}},\;i=1, \cdots,n\] (3) Here, all \(\bar{r}_{m}\) are nonnegative and the \(\bar{\mathbf{\theta}}_{m}=(\bar{\theta}_{m}^{1},\bar{\theta}_{m}^{2},\cdots,\bar{ \theta}_{m}^{n})\) are on the unit sphere in \(\Re^{n}\). 2. Choose a direction \(\bar{\mathbf{\theta}}_{\bar{m}}\) to start, where \(\bar{m}\in\{0,\ldots,M-1\}\). 3. Choose a positive integer \(I\) that represents the size of the neighbor of a point (including the given point itself). Determine the neighbor \(\mathcal{N}_{\bar{m}}\) of \(\bar{\mathbf{\theta}}_{\bar{m}}\) by choosing \(I\) directions \(\bar{\mathbf{\theta}}_{\bar{m}_{i}}\), \(\bar{m}_{i}\in\{0,\cdots,M-1\},\;i=1,2,\ldots,I\), that are nearest to \(\bar{\mathbf{\theta}}_{\bar{m}}\) in a given angular measure (\(\ell_{1}\)-norm or \(\ell_{2}\)-norm, _etc._). 4. Determine the neighbor \(\mathcal{N}_{\bar{m}_{i}}\) for each direction \(\bar{\mathbf{\theta}}_{\bar{m}_{i}}\in\mathcal{N}_{\bar{m}}\) by choosing \(I\) directions \(\bar{\mathbf{\theta}}_{\bar{m}_{i_{j}}}\), \(\bar{m}_{i_{j}}\in\{0,\cdots,M-1\},\;j=1,2,\ldots,I\), that are nearest to \(\bar{\mathbf{\theta}}_{\bar{m}_{i}}\). For each direction \(\bar{\mathbf{\theta}}_{\bar{m}_{i_{j}}}\in\mathcal{N}_{\bar{m}_{i}}\), obtain the neighborhood \(\mathcal{N}_{\bar{m}_{i_{j}}}\) of \(I\) directions \(\bar{\mathbf{\theta}}_{\bar{m}}\), \(m\in\{0,\ldots,M-1\}\), that are nearest to \(\bar{\mathbf{\theta}}_{\bar{m}_{i_{j}}}\) and calculate the median \(\bar{r}_{\bar{m}_{i_{j}}}\) of the lengths \(\{\bar{r}_{m}|\bar{\mathbf{\theta}}_{\bar{m}}\in\mathcal{N}_{\bar{m}_{i_{j}}}\}\). Then, calculate the median \(\hat{r}_{\bar{m}_{i}}\) of the lengths \(\{\tilde{r}_{\bar{m}_{i_{j}}}|\bar{\mathbf{\theta}}_{\bar{m}_{i_{j}}}\in\mathcal{ N}_{\bar{m}_{i}}\}\). 5. Determine the maximum of the median lengths \(\hat{r}_{\bar{m}_{i}}\), \(i=1,2,\ldots,I\). Let \(i^{*}=\text{argmax}_{i=1,2,\ldots,I}\{\hat{r}_{\bar{m}_{i}}\}\). If the maximum is achieved at \(\bar{m}_{i^{*}}=\bar{m}\), go to Step 6. Otherwise, set \(\bar{m}=\bar{m}_{i^{*}}\) and return to Step 3. 6. Refine the location and value of the local maximum of the median radius. Calculate a neighbor \(\mathcal{N}\) of \(\lceil I/2\rceil\) directions \(\bar{\mathbf{\theta}}_{m}\) of the local maximal direction identified in Step 5, where \(\lceil I/2\rceil\) is the smallest integer no less than \(I/2\). The median of \(\bar{\mathbf{\theta}}_{m}\) in \(\mathcal{N}\) is the calculated major direction of the distribution.