• No results found

The estimation of intra- and intergroup linking in social networks

N/A
N/A
Protected

Academic year: 2021

Share "The estimation of intra- and intergroup linking in social networks"

Copied!
25
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

linking in social networks

Bachelor Thesis Econometrics Vien Dinh

11002115 21 december 2018

Supervisor: Sanna Stephan Abstract

This thesis models social networks that contain grouping with the use of random graph model-ling. The grouping is accounted for by looking at intra- and interlinking as separate situations. Two models, the Er¨os-R´enyi model and the degree distribution model, are analysed and com-pared based on estimations from a dataset from BlogCatalog.

(2)

Contents

1 Introduction 3 2 Literature Review 4 3 Research Method 6 3.1 Introductory notes . . . 6 3.2 Dataset . . . 7 3.3 Models . . . 8

3.3.1 Erd¨os-R´enyi model . . . 8

3.3.2 Degree distribution model . . . 8

3.4 Estimation of parameters . . . 10

3.4.1 Erd¨os -R´enyi model . . . 10

3.4.2 Degree distribution model . . . 11

4 Results 12 4.1 Parameters of the models . . . 12

4.1.1 Erd¨os-R´enyi model . . . 12

4.1.2 Degree distribution model . . . 13

4.2 Analysis . . . 14

4.3 Conclusion . . . 17

(3)

1

Introduction

Social networks is an area of application in the world of network formation studies, thanks in part to its unique differentiation from other types of networks. A feature in social network formation researches that is often highlighted is the analysis of the degree, i.e. the amount of connections, of actors in a network. Actors with a high degree have a different influence on the network they belong to than actors with a relatively low degree. The degree of actors unlocks doors to further analysis of networks, such as the appearance of clustering and subsequently the information flow through these networks. Appointing a distribution to these degrees is part of the type of models this paper will research, namely random graph modelling. A wide range of research has been done on social network formation, including intricate calculations and in-depth theories on clustering. Two of the reappearing causes of clustering in these studies are homophily (McPherson, Smith-Lovin, & Cook, 2001; Tarbush, & Teytelboom, 2012) and the bigger probability of two acquaintances also being friends (Watts, & Strogatz, 1998). By dividing a network into two cases, this paper intends to find parsimonious models for the network formation of actors when only the information about connections between actors and their corresponding group in a social network is available. This leads to the research question:

What random graph model to apply for the estimation of intra- and intergroup linking?

The paper will start with a brief overview of relevant past researches by highlighting important formulas and theories. Afterwards, the research method is explained. This chapter starts with the expression of assumptions, after which the data and model are described. The thesis ends with the analysis of results and a conclusion.

(4)

2

Literature Review

Earliest efforts of modelling a network dates back to 1959 when Erd¨os & R´enyi (1959) laid the foundation of the so called ‘random graph’ model. It is in this paper where the principle of connections between actors in a network, which Erd¨os and R¨enyi respectively call nodes and edges, are formed based on a constant. Now, half a century later, it has been shown that this model is a starting point for countless researches. This paper is no exception. A key feature of the model by the Hungarian mathematicians is its simplicity. This simplicity is benefited from by the possibility to solve properties of the network exactly.

Newman (2002) adopts the Erd¨os-R´enyi model in his research. His improvements are mainly motivated by two reasons: the absence of clustering and the unrealistic Poissonian degree. In the model of Erd¨os and R´enyi, any random agent i and j in the network have a chance p to be connected by a link. The degree distribution with k degrees is then binomially distributed, with z the average degree:

pk= n − 1 k  pk(1 − p)n−1−k ' zke−z k! (2.0.1)

However, Newman shows that a lot of real-world networks display some kind of clustering. To prove this point, he lists a considerable variety of networks with a measured clustering coefficient C much higher than its random graph equivalent. This coefficient, first introduced by Watts & Strogatz (1998), is the average probability that two links of an actor also have a link with each other. To apply any arbitrary distribution other than the Poisson the paper identifies a simple solution. By limiting the actors in a network to a finite degree amount k, the probability pk can approach any specific distribution when n gets big. Newman then includes

this degree distribution in the ‘probability generating function’, which allows calculations of properties of the network that were not possible previously. In this same research, Newman presents the difficulties found in calculating more refined clustering characteristics, such as the amount of second-neighbours of an agent in a network. An approximation for the mutuality coefficient, which is the average amount of paths to second-neigbours, is denoted as:

(5)

M = hk/[1 + C

2(k − 1)]i

hki (2.0.2)

In this equation hki =P kpk, in other words the average degree of an agent. Newman calls

this calculation a first step towards the goal of being able to calculate the average amount of paths of any length. The researcher also makes other steps by publishing a research specifically focused on the analysis of clustering in networks (Newman, 2009). In this research the triangles of nodes (group of three friends from a social network perspective) are the foundation of the model. The intricate model developed by the British physicist is an option to analyse network clustering with the use of only one model. This paper proceeds in a different direction, using a model twice for intra- and interlinking separately to account for grouping.

Newman, Strogatz, & Watts (2001) published ‘Random graphs with arbitrary degree distributions and their applications’, in which they laid the groundwork for the application of any degree distribution in random graphs. In this paper, the researchers show that network properties such as the giant component size, or the mean component size in the absence of the giant component, can be calculated for several distributions. Two of these distributions are the exponential distribution and the power-law distribution. The latter is well presented and thus pivotal in random graph modelling of social networks, which will be elaborated further in the paper.

Newman, Watts, Strogatz (2002) expands his random graph model research by publishing a paper focused on random graph models of social networks. The power-law distribution again plays a pivotal role for the degree analysis in this publication. Newman et al. (2002) recognise the complications in obtaining empirical data for social network studies, which is the limitation in its size and the biases found in its answers. The exception to these deficiencies are affiliation networks, a type of network in which the actors belong to a certain group or membership.

(6)

3

Research Method

3.1 Introductory notes

Two models are analysed and compared, namely the Erd¨os-R´enyi model and the degree distribution model. Instead of expending the already existing theory to account for grouping, this research deviates from that direction by making an assumption about the inclusion of grouping in modelling social networks:

Assumption 1. A model for social networks can be split into two parts; one for the linking within groups and one for the linking between groups.

One of the two models that is inspected is the Erd¨os-R´enyi model. The foundation of this model is the constant p, which is the probability that two arbitrary actors in a network make a connection. As follow-up on assumption 1, another assumption is made regarding the linking probabilities p:

Assumption 2. The Erd¨os-R´enyi model produces two different constants for intra- and in-tergroup linking.

An issue occurring in the model of Erd¨os and R´enyi is the disparity between application of the binomial distribution and real-world results. The degree distribution model offers an alternative for random graph modelling. Rather than looking at the linking probability p like the Erd¨os-R´enyi model does, this model looks at the probability that an agent has exactly degree k. An issue occurring in the Erd¨os-R´enyi model is the disparity in the degree distribution between the corresponding binomial distribution and real-world results. Many of these real-world networks tend to take the form of a power-law distribution (Newman, 2002), a distribution which is characterised by a small amount of actors who have a high degree. Huberman Adamic (1999) construct a topological map of the World-Wide Web, during which they find the amount of links in documents to have a power-law distribution. In an effort to model social networks with a random graph model, Newman, Watts, & Strogatz (2002) too utilise a power-law distribution with an exponent and an exponential cut-off. This

(7)

research makes an asusmption regardring the degree distribution congruent to aforementioned literature:

Assumption 3. The degree distribution of actors in an online social network for both intra-and interlinking can be estimated with the power-law distribution.

3.2 Dataset

The data used in this research originates from BlogCatalog. BlogCatalog is a website which publishes blogs on a varying range of topics, written by its users. The data contains infor-mation on the social network of the users within the website, as well as what groups their writings belong to. The links in this dataset are not directed. This implicates that when individual i has a link with j, j automatically has a link with i too.

Descriptive statistics BlogCatalog

actors (N) 10,312

Links (M) 333,983

Maximum degree 3992

Average degree 65

Groups 39

Average group size 371

Average group membership 1,4

From the dataset an adjacency matrix A can be made. This matrix takes value 1 if A(i,j) if individual i is connected with j. The links in this dataset are unweighted, meaning all links have the same value.

(8)

3.3 Models

3.3.1 Erd¨os-R´enyi model

Each of the N nodes of the network belongs to one or more group(s) in U, denoted as U = {u1, ..., u39}. For the estimation of the parameter of the Erd¨os-R´enyi model, the probability

that any arbitrary chosen actors i and j within the same group link is denoted as:

P (Aij = 1|i, j ∈ uq) = pintra (3.3.1)

For the estimation of the probability that i and j link under the condition that they belong to different groups in the Erd¨os-R´enyi model, the probability is denoted as:

P (Aij = 1|i ∈ up∩ j ∈ uq, p 6= q) = pinter (3.3.2)

3.3.2 Degree distribution model

Instead of using a probability that two actors link, the degree distribution model examines the probability that an arbitrary agent in the network has exactly degree k. The degree distribution of the Erd¨os-R´enyi model is binomially distributed, which proved to be sub-optimal for the modelling of social networks. An advantage of the degree distribution is found in the fact that any arbitrary distribution can be utilised. With assumption 3 this paper now models social networks based on the power-law distribution, which is denoted as:

pk=      0 for k = 0 ck−τek/κ for k ≥ 1 (3.3.3)

In this distribution, τ is the exponent and ek/κ is the exponential cutoff, with length κ. The constant c is fixed as c = [Liτ(e−1/k]−1 by the normalisation requirement. Li is the

polylogarithm of order τ . The distribution is estimated twice, namely for estimation of the model for intra- and interlinking.

(9)

A relevant result following from the degree distribution is the average degree of the actors in the network, which can be compared to the averages of the Erd¨os-R´enyi model. This average degree z is denoted as:

z =X

k

kpk (3.3.4)

An interesting situation arises when two arbitrary nodes share membership of multiple groups. In this case, their link could count manifold: once as a link for the random graph model of nodes within a group, and multiple times for the model of nodes between groups. This is visualised in the illustration below.

Figure 1: Link with a count for both the intra- and interlinking model

Naturally, this means the sum of degrees of the intra- and interlinking models can only be equal to or larger than the degree of the node in a regular random graph model. With the two models now being detailed, the parameters for intra- and intergroup linking can be estimated: the p0s of the Erd¨os-R´enyi model and τ0s and κ0s of the degree distribution model.

(10)

3.4 Estimation of parameters

3.4.1 Erd¨os -R´enyi model

The calculation of ˆpintra of the Erd¨os-R´enyi model does not require any laborious calculations.

From the dataset the average amount of intralinks of actors can be calculated by:

ˆ zintra = 1 N n X i=1 degree(i|i, j ∈ uq) (3.4.1)

Actors have a total of N-1 possible links, meaning the probability ˆpintra is calculated by s:

ˆ pintra =

ˆ zintra

N − 1 (3.4.2)

For the calculation of ˆpinter some clarifications are needed. When when an actor belongs

to two or more groups, every link the agent makes may count as an interlink. This is a matter of perspective, as can be seen in the illustration below.

Figure 2: Any link with these actors counts as an interlink (including their link with ea-chother), as they could belong to both group A or B

From the dataset the average amount of interlinks of actors can be calculated by:

ˆ zinter = 1 N n X i=1 degree(i|i ∈ up∩ j ∈ uq, p 6= q) (3.4.3)

(11)

Again, actors have a total of N-1 possibilities to link with others. This gives the probability: ˆ pinter = ˆ zinter N − 1 (3.4.4)

3.4.2 Degree distribution model

To estimate the parameters κ and τ , a grid search is applied. From this grid search follows a best fit of the parameters. Before the search is executed, some preparatory calculations are made. First of all, the degree probability vectors of the BlogCatalog dataset are determined. This is accomplished by counting the amount of links of each agent in the network, based on the conditions found in (3.3.1) and (3.3.2). This vector is divided by the total amount of nodes N to obtain the degree probability vectors ˆpk,intraand ˆpk,inter. Then a three-dimensional

matrix is created with different values for κ and τ on the rows and columns, respectively. The depth of the matrix shares the same length as the degree probability vector (which has k rows). With the degree probability vector and the 3D matrix minimisation criteria are established, which are defined as:

min κ, τ 1010 X k=1 (ˆpk,intra− pk,intra)2 (3.4.5)

for the intragroup linking model and

min κ, τ 3925 X k=1 (ˆpk,inter− pk,inter)2 (3.4.6)

(12)

4

Results

4.1 Parameters of the models

4.1.1 Erd¨os-R´enyi model

From the BlogCatalog data the probabilities ˆpintra & ˆpinter and their respective average

de-grees are calculated like explained in the last chapter. These prove to be:

ˆ

pintra= 0.0013 and pˆinter = 0.0060

ˆ

zintra= 13 and zˆinter = 61

With a two-sided statistical test at a 95% confidence level, which is normally distributed, the null hypothesis ˆpintra = ˆpinter can be tested:

H0 : ˆpintra = ˆpinter versus HA: ˆpintra 6= ˆpinter

z =q pˆintra− ˆpinter ˆ p(1 − ˆp)(n 1 intra + 1 ninter)

with p =ˆ nintrapˆintra+ ninterpˆinter nintra+ ninter

nintra, ninter = N = 10312

z ≈ −5, 60 < −1, 96 = −z0,975

It can be concluded that there is enough evidence to reject the null hypothesis that ˆpintra

and ˆpinter are equal. Plotting the degree distribution of the dataset and the approximation

(13)

(a) Intragroup degree distribution (b) Intergroup degree distribution

Figure 3: Degree distributions of the dataset and the Erd¨os-R´enyi model

4.1.2 Degree distribution model

The grid search for the power law distribution parameters of the intragroup model yields an optimal value of τ = 1 and κ = 129. This gives the degree distribution:

ˆ pk,intra=      0 for k = 0 ck−1ek/129 for k ≥ 1

For the intralinking model the grid search yields τ = 1 and κ = 1537, resulting in:

ˆ pk,inter=      0 for k = 0 ck−1ek/1537 for k ≥ 1

(14)

Below the degree distribution of the dataset and the approximation with the power-law distribution are plotted for both models:

(a) Intragroup degree distribution (b) Intergroup degree distribution

Figure 4: Degree distributions of the dataset and the power-law distribution

4.2 Analysis

From the dataset follows that the estimated constant of the Erd¨os-R´enyi model in the in-tergroup linking is substantially higher than the estimated constant for intragroup linking, which suggests actors are more likely to link with actors who belong to a different group. The statistical test with the null hypothesis that ˆpintra = ˆpinter reveals that there is enough

evidence to show that the constants are not the same. The adjacency matrix gives an average degree of 63 and an average group size of 371 for the network in its entirety. With an average group membership of 1,4 the intralinking model is restricted to an average maximum links of around 520. The interlinking model has exceedingly more potential total links compared to the intralinking model. Thus, when purely analysing the numbers the results seem intuitively right. Furthermore, figure 3 confirms that the binomial distribution is indeed an imprecise approximation for the degree distribution of actors in social networks, both for intra- and in-terlinking. The binomial degree distributions for intra- and interlinking are concave functions on the semi log plot, with a peak at the average degree. It can be seen that the observed

(15)

degree distributions do not comply with this. In no region of the amount of degrees does the binomial approximation estimate the dataset precisely.

Plotting the frequency against the degrees of the actors in the intra- and intergroup on log-log axis gives:

(a) Intragroup links (b) Intergroup links

Figure 5: Degree frequency plots

Figure 5 endorses the earlier mentioned observation that in social networks a small amount of actors have a very high relative degree, and this supports assumption 3 made in the intro-ductory notes to model the degree of actors in the network with the power-law distribution. The parameters τ and κ that provide the best fit of the degree distribution models translate into the visualisation in figure 4. The intragroup model shows an appropriate fit throughout all observed degrees in the data set. However, the intergroup estimation contains a discrep-ancy in the lower degrees between the degree distribution of the dataset and the estimated power-law distribution. The power-law distribution predicts a higher probability for the lower degrees than the observed degrees. This implies the observed degrees are less exponentially distributed than the estimation.

(16)

produces averages of 61 and 193 for the Erd¨os-R´enyi model and the degree distribution model, respectively. It should be noted that the degree distribution model produces a less accurate average degree than the Erd¨os-R´enyi model. This reduction in accuracy originates from the estimation of the degree distribution, which in itself inherits differences from the observed data (as seen in figure 4). Contrarily, the degree distribution model is superior to the Erd¨ os-R´enyi model when analyzing degree properties as it offers information about probability of the degree of actors with greater accuracy, provided that the correct distribution is used. This leads to insights on the centrality of actors in the network, where actors with a higher degree are more central. In social networks especially this may play an important factor, as it is not always the case that all actors have equal amount of degrees.

(17)

4.3 Conclusion

Previous researchers have offered multiple ways to model grouping with the use of random graph modelling. This thesis accounted for grouping with the division of links made between actors in the same group and links with actors in other groups, in other words models for intra-and intergroup linking. Two models were analysed intra-and compared, namely the Erd¨os-R´enyi model and the degree distribution model. The parameters of the two models were estimated for a dataset from BlogCatalog, an online blog social network.

Calculations find that the Erd¨os-R´enyi model produces accurate degree averages of actors in the model, but its flaw is found in the degree distribution that follows from this model. With the use of the power law distribution, a much used distribution in the modelling of social networks, the probabilities of the degrees of actors in the network were calculated with the degree distribution model. Contradictory to the Erd¨os-R´enyi model, this degree distribution model generates a less accurate average degree of actors in social networks. The strength of the model is found in its depiction of the degree of actors, as the research showed that the estimated degree distribution has an acceptable fit with the data. The consideration between the choice of model should be based on what network properties one desires to obtain. The Erd¨os-R´enyi model offers a simple solution with uncomplicated equations when one solely wants to know averages of a social network. The degree distribution model is more favorable when looking at individual degree properties.

While offering an alternative for the modelling of grouping in social networks, this research merely makes the very first steps into this direction. Room for improvements are possible, such as finding a better fitting distribution when the degree distribution does not completely satisfy the power-law distribution. Moreover, the conclusions drawn are based upon a dataset with information on one particular social network. Results from other datasets may vary from

(18)

Refrences

Erd¨os, P., & R´enyi, A. (1960). On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci, 5 (1), 17-60.

McPherson, M., Smith-Lovin, L., & Cook, J. M. (2001). Birds of a feather: Homophily in social networks. Annual review of sociology, 27 (1), 415-444.

Newman, M. E. (2002). Random graphs as models of networks. arXiv preprint cond-mat /0202208.

Newman, M. E. (2009). Random graphs with clustering. Physical review letters, 103(5), 058701. Newman, M. E., Strogatz, S. H., & Watts, D. J. (2001). Random graphs with arbi-trary degree distributions and their applications. Physical review E, 64 (2), 026118.

Newman, M. E., Watts, D. J., & Strogatz, S. H. (2002). Random graph models of social networks. Proceedings of the National Academy of Sciences, 99 (suppl 1), 2566-2572.

Tarbush, B., & Teytelboym, A. (2012, December). Homophily in online social networks. In International Workshop on Internet and Network Economics (pp. 512-518). Springer, Berlin, Heidelberg.

Watts, D. J., & Strogatz, S. H. (1998). Collective dynamics of ’small-world’ networks. nature, 393(6684), 440.

(19)

Appendix

Programs

%Load csv files into MATLAB N = csvread(’nodes.csv’); E = csvread(’edges.csv’); GE = csvread(’group-edges.csv’); A = zeros(length(N)); num_rows = size(E, 1); nodes = size(A, 2);

%Putting 1’s in the adjacency matrix for i=1:num_rows; for j=1:nodes; if E(i,2) == j A(E(i,1), j) = 1; end end end

%Symmetry of the adjacency matrix for i=1:1:nodes; for j=1:1:nodes; if A(i, j) == 1 A(j, i) = 1; end end end G = graph(A); % Descriptive statistics deg = degree(G); maxdeg = max(deg); avdeg = sum(deg)/nodes;

(20)

groupsize = groupsize(1:39); end

%%

% Calculate amount of edges per node within groups intradeg = zeros(length(N),1);

for i=1:length(GE) for j=1:length(GE)

if GE(i,2) == GE(j,2) && A(GE(i,1), GE(j,1)) == 1 intradeg(GE(i,1)) = intradeg(GE(i,1)) + 1; end

end end

% Degree frequency vector intra-edges Dk_intra = zeros(max(intradeg), 1); for i = 1:length(Dk_intra) Dk_intra(i) = sum(intradeg==i); Dk_intra = Dk_intra(1:max(intradeg)); end pk_intra_hat = Dk_intra./nodes; interdeg = zeros(length(N),1); % Matrix classes per node

node_classes = zeros(max(GE(:,1)),max(GE(:,2))); for i=1:length(GE(:,1))

node_classes(GE(i,1),GE(i,2)) = 1; end

avmembership = mean(sum(node_classes,2)); % Average amount of groups an actor belongs to % Calculate amount of links per actor between groups

for i=1:length(node_classes) row_i = node_classes(i,:); for j=1:length(N)

if i~=j

row_j = node_classes(j,:);

(21)

interdeg(i) = interdeg(i) + 1; end

end end end

% Degree frequency vector interlinks Dk_inter = zeros(max(interdeg), 1); for i = 1:length(Dk_inter) Dk_inter(i) = sum(interdeg==i); Dk_inter = Dk_inter(1:max(interdeg)); end pk_inter_hat = Dk_inter./nodes; %%

%vector k with length equal to maximum degree sumvec = zeros(3925,1);

for i=1:3925

sumvec(i) = i; end

%%

% Plot degree/frequency with a logarithmic axis figure loglog(Dk_intra, ’o’) title(’Intragroup links’) xlabel(’degree’) ylabel(’frequency’) figure loglog(Dk_inter, ’o’) title(’Intergroup links’) xlabel(’degree’) ylabel(’frequency’) %%

(22)

for i=1:10 for j=1:300

for k=1:1010

pk_intra_grid(i,j,k) = (k^(-i)*exp(-k/j))/(polylog(i, exp(-1/j))); end

end end

% Matrix for sum-squared of (pk_intra - pk_intra_hat)^2 pk_sumsquared_intra = zeros(1,100);

for i=1:10 for j=1:300

pk_sumsquared_intra(i,j) = sum((squeeze(pk_intra_grid(i,j,:)) - pk_intra_hat).^2); end

end

% Index of element with lowest value

[value_tau_intra, value_kappa_intra] = find(pk_sumsquared_intra == min(min(pk_sumsquared_intra)); % 3D matrix for the grid search of the best combination of tau and kappa

pk_inter_grid = zeros(10,3000, length(Dk_inter));

% Make 3D grid of probability vector for different values of tau and kappa for i=1:10

for j=1:3000 for k=1:3925

pk_inter_grid(i,1538-j,k) = (k^(-i)*exp(-k/j))/(polylog(i, exp(-1/j))); end

end end

% Matrix for sum-squared of (pk_intra - pk_intra_hat)^2 pk_sumsquared_inter = zeros(10,3000);

for i=1:10

for j=1:3000

pk_sumsquared_inter(i,j) = sum((squeeze(pk_inter_grid(i,j,:)) - pk_inter_hat).^2); end

(23)

% Index of element with lowest value

[value_tau_inter, value_kappa_inter] = find(pk_sumsquared_inter == min(min(pk_sumsquared_inter)); %%

%Vector of pk_intra from estimation with power-law distribution pk_intra_optimal = zeros(length(Dk_intra), 1);

for i=1:length(Dk_intra)

pk_intra_optimal(i) = (i.^(-value_tau_intra)*exp(-i/value_kappa_intra))/(polylog(value_tau_intra, exp(-1/value_kappa_intra))); end

%Vector of pk_inter from estimation with power-law distribution pk_inter_optimal = zeros(length(Dk_inter), 1);

for i=1:length(Dk_inter)

pk_inter_optimal(i) = (i.^(-value_tau_inter)*exp(-i/value_kappa_inter))/(polylog(value_tau_inter, exp(-1/value_kappa_inter))); end

z_intra_DD = sum(pk_intra_optimal.*sumvec(1:1010)); %Average degree intralinks degree distribution z_inter_DD = sum(pk_inter_optimal.*sumvec); %Average degree interlinks degree distribution

%%

%Calculate p_intra (Erdos-Renyi model) count_same_group = zeros(length(A), 1); for i=1:length(GE)

for j=1:length(GE)

if GE(i,2) == GE(j,2) && A(GE(i,1), GE(j,1)) == 1 %check if i and j in same group and they have a link count_same_group(GE(i,1)) = count_same_group(GE(i,1)) + 1; end end end z_intra_ER = sum(count_same_group)/nodes; p_intra_hat = z_intra_ER/(nodes-1); %%

%Calculate p_inter (Erdos-Renyi model) count_other_group = zeros(length(A),1);

(24)

else

for j=1:length(A) % loop over all indices groups_j = node_classes(j,:);

if sum(groups_j) >= 2 % j is in two or more groups, interlink possible if A(i,j)==1 % check if link exist

count_other_group(i) = count_other_group(i) + 1; end

elseif sum(groups_i ~= groups_j) > 0 % groups must be different for interlink to be possible if A(i,j)==1 % check if link exist

count_other_group(i) = count_other_group(i) + 1; end end end end end z_inter_ER = sum(count_other_group)/nodes; p_inter_hat = z_inter_ER/(nodes-1); %%

%Plot pk_intra and pk_inter for degree distribution model figure semilogx(pk_intra_optimal) hold semilogx(pk_intra_hat) xlabel(’Degree’) ylabel(’Probability’)

legend(’Power Law Dis.’,’BlogCatalog’) figure semilogx(pk_inter_optimal) hold semilogx(pk_inter_hat) xlabel(’Degree’) ylabel(’Probability’)

legend(’Power Law Dis.’,’BlogCatalog’) %%

(25)

pk_intra_ER = zeros(1010,1); for i=1:1010 pk_intra_ER(i) = z_intra_ER^(i)*exp(-z_intra_ER)/factorial(i); end pk_inter_ER = zeros(3925,1); for i=1:3925 pk_inter_ER(i) = z_inter_ER^(i)*exp(-z_inter_ER)/factorial(i); end figure semilogx(pk_intra_ER) hold semilogx(pk_intra_hat) xlabel(’Degree’) ylabel(’Probability’) legend(’Binom. Dis.’,’BlogCatalog’) figure semilogx(pk_inter_ER) hold semilogx(pk_inter_hat) xlabel(’Degree’) ylabel(’Probability’) legend(’Binom. Dis.’,’BlogCatalog’)

Referenties

GERELATEERDE DOCUMENTEN

(2) Meer specifiek kan genoemd worden dat meer problemen op het gebied van Niet Snappen (gemeten met de VISK), Angst voor Verandering (gemeten met de VISK) en Communicatie (gemeten

Naast deze bevinding, werd in de huidige studie tevens geen modererend effect gevonden van middelengebruik, het aantal vrienden en eerdere hulpverlening op het verband

The cur- rent study extends previous work on stress and psychological problems, by examining whether the experience of stressful experiences is related to internalizing (INT)

Rabbits that received subconjunctival liposomal triamcinolone acetonide phosphate (LTAP) or liposomal prednisolone phosphate (LPP) had significantly lower mean inflammatory

In the present research, it was therefore examined whether key characteristics of adolescents ’ narration (autobiographical reasoning and agency) were concurrently and

Notwithstanding, the central role of communication during host and tourist encounters, there is a hiatus of research-based insights on how the South African tourism industry

Maar juist door deze methode zal het duidelijk worden, dat de mens een hoog gewaardeerd produktiemiddel is waar zui- nig mee omgesprongen dient te worden... In

The data herein illustrates a number of key findings about old and new terrorism. Through an individual analysis of the goals, targets, and tactics as the primary variables