{'fraction_non_alphanumeric': 0.034253304751697036, 'fraction_numerical': 0.010003572704537335, 'mean_word_length': 4.3972041455772475, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Wikipedia edition dynamics

A model for the probabilistic function followed in Wikipedia edition is presented and compared with simulations and real data. It is argued that the probability to edit is proportional to the editor's number of previous editions (preferential attachment), to the editor's fitness and to an ageing factor. Using these simple ingredients, it is possible to reproduce the results obtained for Wikipedia edition dynamics for a collection of single pages as well as the averaged results. Using a stochastic process framework, a recursive equation was obtained for the average of the number of editions per editor that seems to describe the editing behaviour in Wikipedia.


Introduction
The extensive monitoring of people's daily activities, in particular their online actions, yields a large amount of information which, adopting stochastic techniques, can be used to determine some of the probability distributions that govern social interactions. Statistical physics uses a probabilistic description [1] to obtain useful information about the general behaviour of many particle systems. In this way, it is possible to find some properties of macrosystems, regardless of the complex individual behaviour of each particle, or, in the case of social systems, of each human being.
Human activity is very far from being a random process, in the sense of anybody being able to do anything at any time. Although each person has, at each time, the opportunity to choose from different options, actually one is immersed into an intricate net of social rules, schedules, socially accepted manners, power and economic constraints, etc., which end up determining the available usual options. The probability distribution for each type of human behaviour greatly depends on the specific human trait that is being studied. Understanding the laws that govern human activity is a great challenge for science as it may arguably be considered the most complex stochastic process in Nature.
Wikipedia (WP) edition is one of these sources of probabilistic outcome [2]. Some effort has already been put in attempts to understand the evolution of WP as a network, with pages or topics as nodes and links between them as edges [3,4,5,6]. Several models have been proposed to describe the activity patterns of editors over different pages [7,8]. For a single page, Wilkinson and Huberman proposed a simple stochastic mechanism to obtain the probability distribution for that page's number of editions as a function of time, based on the simple rule that "edits beget edits" [9]. This case of preferential attachment belongs to the elemental process introduced by Simon [10] in 1955, in an early observation of universal patterns on linguistic, sociological and biological data.
The high quality of WP encyclopedia is the result of a collective effort by millions of volunteers, in an apparently disorganized process of edition, acceptance and rejection, which works, in fact, as an effective and robust peer review procedure. Halfaker et al. studied some WP editor characteristics that lead to the process of selection of high quality contributions [11].
In agreement with the concept of universality, in the statistical physics meaning, we propose in this paper a statistical approach for the probability of each editor to interact with the WP page, based on three principles already shown to be essential in human interaction. We use the preferential attachment mechanism to represent the strong tendency of users to improve and defend their previous contributions [11]. This ownership feeling competes with the authority of users that are experts on the page topic, which is expressed in our model by an increased value of a parameter that we associate to each editor and that is usually called fitness [12,13,14]. Fitness may also describe the different drive that different persons have to push forward their opinions. Finally, an ageing factor [15,16] is proposed, associating the time-dependent behaviour to an initial high motivation to edit, followed by a tendency to decrease the edition activity by theme completeness, personal saturation, blockage [17] and/or any other possible personal reason.
The analytical calculations to describe the edition dynamics with the three above mentioned ingredients have produced a recursive equation for the average number of editions per editor that describes qualitative and quantitatively the real behavior displayed by the WP edition dynamics. This article is structured as follows: in section 2, the real data sample is presented. Section 3 discusses the choice of the ingredients used to describe real data while section 4 explains in detail the model to represent the edition process. In section 5, the analytical treatment is developed and the conclusions are finally presented in section 6.

Real data
The real data results shown in this work were obtained from the January 2010 dump of the English WP, containing 4.64 million pages, accessible at the Wiki-WarMonitor web page (http://wwm.phy.bme.hu/). The data sample used, a "light dump", contains a reduced information listing of all the page edits (as the edition number and the editor identification). Only pages with more than 2000 editions were analysed. They were divided into five ranges of R (the ratio between the number of different editors involved in the editing of one page and the total number of editions of that page), from 0.1 to 0.6, in bins of 0.1.
Only the first 2000 editions of each page were analysed and compared with the simulation results.

Edition probability
It was argued in a previous paper [18], that one of the main characteristics of WP edition is an approximately constant rate, R, of incoming new editors, as illustrated in Fig. 1. This figure shows the editor's activity, by plotting a symbol for each edition of the article made by each specific editor, where editors are numbered according to the chronological order of their debut in the article. The real WP page Jesus (left) is compared with a simulation (right) for some chosen components and parameters, as explained later. The plot for the real page shows clearly an initial intensive activity for each editor, as can be seen by the high density of symbols near the diagonal (line that corresponds to the first edition made by each editor), followed, for most editors, by a clear decay. This indicates that most editors have an initial high motivation to edit which, in time, just fades away. However, it is also clear from the thick long horizontal lines in the same plot, that there are some super-editors (editors with far more editions than the average) who actually manage to maintain the editing drive.
It seems clear that we need three ingredients, to allow for a good qualitative description of this behaviour. Preferential attachment is surely an essential part [19]. The presence of hubs (the super-editors in WP edition) in a network is a common signature for preferential attachment. A fitness function is also required to enhance the edition probability of some thereafter super-editors. Preferential attachment alone cannot explain the super-editor distribution in Fig.1, as all super-editors would then enter the edition process very early. Fitness allows for the possibility of super-editors to start at any later time. Finally, we must also include an ageing function to decrease the editing probability as time progresses. This effect is displayed in Fig.1 by the dampening of most editors' edition frequency as time elapses.
The study of the edition process requires some definitions. The successive article editions are numbered in chronological order and the variable that refers to a specific edition number is denoted by e where, in our universe of 2000 editions, 1 ≤ e ≤ 2000. The editors are also assigned a number in chronological order of their inception and the variable that refers to editor E i is i, where 1 ≤ i ≤ 2000 × R. e i is defined as the value of e when editor E i starts to edit and ε i = e − e i is defined as the number of editions after editor E i has started to edit. We shall refer to an editor by E i , by editor number i or by editor who started at e i . (Note that 1 ≤ e i ≤ 2000 but that, for each page, there are only 2000 × R different values of e i . Note also that ε i = 0 when editor E i starts to edit.) For each range of values of R, all the pages with more than 2000 editions were selected. Let N p be the number of selected pages. We took the first 2000 editions from each of these pages and measured the number of editions done by each editor. Let k(e i , e) be the number of editions done by editor E i up to edition number e. Using k(e i , e), we made two different calculations. In one calculation, we present the results for the collection of N p pages. We took all the N p × 2000 × R values of k(e i , e) and inserted them in bins with equal length (we used 1). Then we measured the number of editors whose number of editions laid inside each bin, thus obtaining the probability distribution for the number of editions per editor for that collection of pages. In the other calculation, we evaluated a simple average of k(e i , e) (which we denote by k(e i , e)) for all the editors who started to edit at edition number e i over all N p different WP pages. This is done for each of the e possible values of e i (note that if, in a specific page, no editor starts to edit at edition number e i , that counts as zero editions for the calculation, which will always average for e terms). Finally, these e values of k(e i , e) were inserted in bins of equal length (0.2) and the probability distribution for the average number of editions per editor was obtained.
Several simulations of the WP edition dynamics were performed with all these ingredients. Two different absolutely continuous random variables were tried to describe fitness: a random variable ζ with a uniform distribution in the interval (0, 1) and a random variable which follows the power law ξ = (0.01 + ζ) −γ . We found that the uniform random variable was not powerful enough to create the super-editors who appear late in the edition process. The power law, on the contrary, seemed capable of providing very few editors with a very high edition proficiency. For the ageing mechanism, we tested the inactivation suggested in ref. [18] and an exponential form of ageing e −qεi , which is, for a sufficiently large pool of pages, equivalent to the inactivation procedure in the average number of editions per editor calculation. We found that this form of ageing kills the editor's contribution too quickly, thus hindering a long editorial history for the editors. Therefore, we tried a power law function ε −α i , that had already been used in ref. [16], and which allowed for a smoother inhibition to the continued editorial activity of the editors.
The model parameters were chosen from a comparison between the WP real data and the simulation, using a two-sample Kolmogorov-Smirnov test [20]. The values obtained are γ = 0.90 for the fitness parameter, q = 0.0005 for the ageing exponential parameter and α = 1.25 for the ageing power law parameter.
In Figs. 2 and 3, we show a comparison between real data and simulations. The same number of pages was used in simulations and in real data calculations. For two different ranges of R, we show both the number of editions per editor for a collection of pages and the average number of editions per editor (as explained above). In Fig. 2, the simulations were done with uniform fitness and each of the three kinds of ageing, and in Fig. 3 the simulations were run with power law fitness and again each of the three kinds of ageing. The results indicate that the best fit is obtained with the power law fitness and the power law ageing mechanism.
The exponential and the power law forms of ageing were further compared in Fig. 4, which shows the average number of editions k(e i , e) as a function of e i for e = 2000, for real data and for two simulations. Both simulations were preformed with preferential attachment and the power law form of fitness. One uses the exponential ageing mechanism and the other uses the power law. The comparison is striking.

Fitting model
The agent-based model used to obtain the simulations in this paper is based on the ingredients discussed in the previous section. The model is described in detail in [18] but the only part that is required here are the elements on the edition dynamics.
A computer simulation run starts with one editor and the choice of a value of R. At each dynamical step, e, a new editor comes in and edits the page for the first time with probability R. Then, at each time step, an old editor E i will edit the article with probability 1 − R. The probability for choosing a particular editor E i among all the old editors will be:  The real data is shown in black, the simulation with preferential attachment, power law fitness and exponential ageing in red, and the simulation with preferential attachment, power law fitness and power law ageing in green. It is clear the general good description of real data and the later simulation.
where x j is the fitness parameter of the editor who started at e j , which is initially chosen following the power law mentioned above, and is maintained during the whole run. The sum in the denominator is over all editors who have edited the article before edition e.
The qualitative agreement between real data and simulation is good for all the ranges of R, as shown in 5, taking into account the reduced number of ingredients and parameters used.

Analytic calculation
In this section, an analytical approach for the problem of finding the average number of editions per editor is developed. The mathematical problem of obtaining the number of editions of an editor at each edition number e is similar to the problem of finding the degree of a node in a network. It has been mentioned before that the editors play the role of nodes and the editions the role of connections, the difference being, of course, that in this case the edition does not connect an editor to another one. Instead, it connects an editor to the WP page that is being edited, which is outside the network.
This problem is often studied under the continuum approximation [19,13,14,16,21,22] although some authors have performed exact calculations [23,24]. A network with preferential attachment and a power law ageing has already been studied by Dorogovtsev and Mendes [16]. Using a continuum approach, they have obtained an equation for k(e i , e) (in the following discussion, their notation will be adapted to this paper's specific problem): In the continuum approach it is assumed that e, e i and k are continuous real variables. They proceeded to show that, for α < 1, the solution can be written in terms of a hypergeometric function and that the distribution of the number of editions per editor follows asymptotically a power law. For α ≥ 1, however, the problem is more complicated. It is easy to see that Eq.(2) fails for this range of values of α, due to a divergence of the integral in the denominator. According to Dorogovstsev and Mendes, the number of editions per editor should now follow an exponential behaviour, but the statistics is too poor for this statement to be verified by simulations. The power law ageing effect described in this paper is the same as the one Dorogovtsev and Mendes use in the above formalism. However, as the value obtained for the parameter α is larger that one, their results cannot be used. Clearly, the divergence of the integral in Eq.(2) is caused by the continuum approach, as the divergent term (e − u) −α would never be larger that one in the discrete approach for α ≥ 1.
Therefore it is necessary to go back to the discrete formalism. Assuming an ensemble of similar articles, the average number of editions k(e i , e) made by the editors who started at e i will now be k(e i , e) = lim  where k j (e, e i ) is the value of k(e i , e) for article j of the ensemble (it can be zero, if no editor started at e i in that particular article). Now, let κ(e, e i ) and ξ(e i ) be the random variables "number of editions of the editor who started at e i at edition number e" and "fitness of the editor who started at e i " respectively. Then where P is the probability function. Naturally, the term k = 0 does not contribute to the summation in Eq.(4). However, it was left there to stress the non-zero probability for the editor who started at e i not to edit a specific WP page (P {κ(e, e i ) = 0} = 0 for i > 1). For e i = e, we obviously have k(1, 1) = 1 and k(e, e) = R, ∀ e>1 .
The change of k(e i , e) in one step, from e to e + 1, is given by and ∆k(e + 1, e + 1) = R.
Π i has already been defined by Eq.(1) as the probability for choosing editor E i to edit the article at edition number e, assuming that, at e, no new editor comes in. In this case, Π i is a random variable that, besides depending on e and e i , is proportional to the editor's number of editions κ(e, e i ) and to its fitness ξ(e i ). However, this implies that Π i must also depend on the number of editions, edition number and fitness of all the other editors (because of the normalisation constant for the probability) and the simplification of Eq.(6) requires some care.
We define the random vectors κ(e) and ξ(e) and the integer and real vectors k(e) and x(e) respectively as vectors with e components given by for i = 1, ..., e, where k i is a variable that can take integer values from zero up to e and x i is a variable that takes values in the fitness set of values. Π i (k(e), x(e)) (we shall omit the dependence on e and e ℓ , for 1 ≤ ℓ < e) is then related to the conditional probability where the sum over k(e) runs over all sets of integers for which there is a positive contribution to the sum. The sum over x(e) will be an integral if the fitness turns out to be a continuous variable (as is the case in our model). In order to continue, a specific expression for Π i must be chosen. Eq.(1) yields Unfortunately, this expression does not allow for the simplification of Eq. (11). One way to solve this problem is to make the approximation that the denominator is approximately a function of e alone This approximation amounts to assuming that the probability distribution P {κ(e) = k(e), ξ(e) = x(e)} will cause a tight spread of the summation in eq. (13) around an e dependent value. Using this expression in Eq.(11) we obtain As the random variables κ(e, e i ) and ξ i are not independent, we cannot simplify this equation by factorising the probability in two terms (the probability for κ and the probability for ξ) and eq.(14) becomes ∆k(e i , e + 1) = 1 F (e + 1) where E(κ(e, e i )|ξ i ) is the conditional expectation value for κ(e, e i ), assuming ξ i . However, this expression suggests that we can obtain a more tractable result if we start with the conditional average value k(e i , e|x i ), assuming a specific value x i for the fitness of editor E i , instead of starting with the non-conditional average. Then we do not get the final sum in x i and the sum in k i just produces the conditional average again. Similar calculations to the ones above lead to the following result, after using approximation (13), This equation, together with Eq.(5) can be solved by recurrence and the result for the non-conditional average can then be obtained by F (e + 1) can be evaluated by summing Eq. (16) for all values of e i from 1 to e and using Eqs. (5) and (17). The final result is We choose the values of x i that allow for the calculation of the integral in Eq.(17) by a Gauss-Legendre quadrature. Eq.(16) is then solved recursively for those values of x i , thus providing a value for the average number of editions done by the editor who starts to edit at step e i , and who has fitness x i (in the approximation Eq. (18)). Finally, Eq.(17) provides the results for k(e i , e).
Several number of points were tried for the Gauss-Legendre quadrature. It was found that 40 points were enough to obtain convergence, as the results almost did not change with a larger number (we went up to 100 points). The recursive calculation is compared with the simulation in Fig. 6. Both calculations were performed with 5k editions and the simulation was obtained with an average over 50k pages. The agreement is, in general, good for all the values of R. The discrepancies are not due to statistical error, but to the approximation in Eq. (13). This approximation seems to be reasonable.

Summary
In this paper, Wikipedia edition, which is an available free source of human knowledge, was analysed. It was shown that this process, far from being random, is instead well reproduced in terms of previous activity, capability to edit and an ageing effect. We successfully reproduced the distribution of both the number of editions per editor for a collection of single pages and its average showed by real data. It is proposed that the essential ingredients for the probabilistic function are the preferential attachment, a power law ageing function and an editor random fitness, also following a power law distribution. The comparison of real data with the results obtained by simulations with different ingredients, previously found as emergent from human interactions, were shown. An agentbased model was developed, using the best fitting ingredients and it successfully reproduces real data, both for the edition of a collection of single pages and for the average over many pages. A recursive expression of the probabilistic function was achieved for the average WP page edition. The agreement of the analytical approach with the simulation results is good, being also in accordance with real data.
The work of Y.G. presents research results of the Belgian Network DYSCO (Dynamical Systems, Control, and Optimization), funded by the Interuniversity Attraction Poles Programme, initiated by the Belgian State, Science Policy Office. The scientific responsibility rests with its author(s).  The simulation was obtained with the same ingredients as before: preferential attachment, power law fitness (with γ = 0.90) and power law ageing (with α = 1.25) (see text for the explanation of the different components). The agreement between the recursive calculation and simulation is, in general, good.