# Analysis of the Pre and Post-COVID-19 Lockdown Use of Smartphone Apps in Spain
## 4 Methods
One way to address this issue is to perform a dimensionality reduction, such as a Principal Component Analysis (PCA) [43]. PCA chooses a linear projection for each data point onto only the first few principal components to obtain lower-dimensional data representation while preserving as much of the data's variance as possible. The problem with unsupervised linear dimensionality reduction frameworks is that they often miss important non-linear structures in the data. To address the limitations of PCA, we propose non-linear manifold learning techniques to improve the visualization of the cluster results. Manifolds are seen as a generalization of linear dimensionality reduction frameworks such as PCA, with the clear advantage that they can be sensitive to non-linear structures in data. Although there are many different manifold learning algorithms, the critical challenge in the dimensionality reduction problem is to preserve the structure of the data as much as possible and to perform the transformation with minimal information loss. We have opted for the Isomap (Isometric mapping) [44] manifold because of the globally optimal, provable convergence guarantee, and applicability to a broad range of data sources and problems [45; 46; 47; 48]. Isomap performs low-dimensional embedding based on the geodesic distance induced by a neighborhood graph. The steps involved in broad terms are:  
1. Construct a neighborhood graph either with k-nearest neighbors or with some fixed radius. Either if points are closer than that radius or if they are k-nearest neighbors, they become connected to each other. 2. Construct the geodesic distance matrix with the shortest path between all pairs. At this point, the most popular algorithms are Dijkstra and Floyd-Warshall algorithms. 3. Compute a lower-dimensional embedding via multidimensional scaling (MDS). The first eigenvectors corresponding to the top n eigenvalues of the geodesic distance matrix represent the coordinates in the new lower-dimensional Euclidean space. Isomap allows the representation of the data, originally defined in a high-dimensional space, in a 2D space through the trained embedding. The Isomap algorithm was trained with the selected apps usage before lockdown, also including the Age and the Android version for every user. With the trained embedding, one cannot only visualize the projection of the data in a 2D space, but also observe the groups formed as a result of the K-means clustering. The results of the clustering and the manifold for the 2D representation are shown at the top left of the Figure 4 (To interpret the color content of this figure, we refer the reader to the web version of the article.). Another interesting application that Isomap offers is the possibility of visualizing the evolution of the groups over time. If the data are passed through the embedding using the same features it was trained on (without retraining the manifold) but in a different time period, i.e., in the post-lockdown period, one can visualize how the clusters are shifted by the 2D projection provided by the Isomap trained on the pre-lockdown period data (Figure 4).