## 4 Methodology
The same condition for the definition of Lognormal occurs with a very small shift in space. Figure 7: Probability Density Function (PDF) that describes the distribution of displacements between the topic locations of consecutive years (_flight length_) for each author and comparison with other distributions. ### General Applicability

Since the application of this kind of analysis to the use case of scholars provides interesting results, we believe that the method is promising for a more general application, with a few adaptations. For example, mobility could be used to analyze users of a generic social media platform and evaluate the change of trending topics. As a significant difference, in our study we used the corpus of articles of the selected scholars for both training the word embedding and the specific mobility analysis. However, in general this is not necessary. Instead, it is important to have a comprehensive and large corpus of textual data, covering most subjects to be analyzed. Thus, this step needs to be performed only once, offline with respect to the following steps of the analysis and possibly with a completely different technological stack; e.g., Python instead of Java. This is quite important, since training the word embedding system can be a time consuming and resource intensive computation. The complexity of this training phase depends largely on the abstract algorithm and also on the details of its implementation. In the case of Word2 Vec, the complexity depends most on the corpus size \(N\) rather than on the numbers of unique words \(V\). It exploits a binary-search over a vocabulary-sized array to achieve the sampling of negative examples, thus its complexity can be resumed as \(\mathcal{O}(N*log(V))\), where \(N\) is the total corpus size and \(V\) is the unique-words vocabulary count. However, the choose of algorithm's parameter can affect the complexity, such as the window size and the negative sampling ratio. For a general application of this process to a social platform, the rest of the process can remain virtually the same, as shown in Algorithm 2. To perform the process periodically, it is necessary to collect new posts published by users (and, possibly, also to update the very same set of users). Calculating the users' paths and their mobility measure (i.e., their Radius of Gyration) can be performed in the same way as described for the case study. It is worth noticing here that the whole process can scale gracefully and quite linearly over a larger number of users \(n\), with complexity \(\mathcal{O}(n)\). In fact, the workload to perform for each user is virtually constant (it does not depend on the number of users). Moreover, the computation to perform for each user depends only on that user's data; i.e., it can be performed independently and possibly vectorized for parallel execution (by several Spark executors, for example). Thus, an appropriate number of workers can be chosen, for reaching the desired trade-off between global cost and execution time [46]. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**First Candidate** & **Second Candidate** & **R** & \(\mathbf{p}\)**-Value** \\ \hline Power law & Lognormal & **222.65** & 0.0 \\ \hline Lognormal & Truncated Power law & **206.68** & 0.0 \\ \hline Lognormal & Exponential & **103.61** & 0.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Loglikelihood Ratio test results. When \(R>0\) the first candidate fits better than the second; vice versa in the other case. \begin{table}
\begin{tabular}{c c} \hline \hline
**Candidate Distribution** & **KS Distance** \\ \hline
**Power law** & 0.40 \\ \hline
**Truncated power law** & 0.24 \\ \hline
**Exponential** & 0.52 \\ \hline
**Lognormal** & 0.03 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Results related to the Kolmogorov–Smirnov test applied to each distribution fit in the Cumulative Density Function form.