m node strength distribution algorithm matlab simulation based on BBV network

Table of contents

1. Algorithm simulation effect

2. Algorithms involve an overview of theoretical knowledge

3. MATLAB core program

4. Complete algorithm code file


1. Algorithm simulation effect

The matlab2022a simulation results are as follows:

 

2. Algorithms involve an overview of theoretical knowledge


      With the development of the Internet and the continuous increase of data scale, network science has been widely used in various fields. In network science, node strength is an important indicator, which is used to describe the importance or centrality of a node in the network. This paper proposes a node strength distribution algorithm based on BBV network, which calculates the strength of each node through the analysis of the network structure and the interaction between nodes, and distributes the node strength. We have carried out experiments to verify the algorithm, and the results show that the algorithm can effectively calculate the node strength and improve the accuracy and reliability of network analysis.
     With the development of the Internet and the continuous increase of data scale, network science has been widely used in various fields. The main goal of network science research is to analyze and understand the network structure and the interactions between nodes in the network. In network science, node strength is an important indicator, which is used to describe the importance or centrality of a node in the network. Node strength is often used to analyze different types of networks such as social networks, protein interaction networks, and transportation networks.
      In traditional network analysis, node strength is usually determined by calculating the degree of a node (that is, the number of connections of a node). However, the degree of a node does not always accurately reflect the importance of the node. For example, in a social network, one's friends may be more influential than other people's friends, so the person's node strength should be higher than other people's node strength. Therefore, a more accurate method to calculate node strength is needed.
      A node strength distribution algorithm based on BBV network is proposed. The BBV network is a social network-based model that can simulate the interaction between nodes in a social network. The algorithm calculates the strength of each node through the analysis of network structure and the interaction between nodes, and distributes the strength of nodes. We have carried out experiments to verify the algorithm, and the results show that the algorithm can effectively calculate the node strength and improve the accuracy and reliability of network analysis.
        In network science, node strength is an important indicator, which is used to describe the importance or centrality of a node in the network. The traditional node strength calculation method is based on the degree of the node, that is, the number of connections of the node. However, the degree of a node does not always accurately reflect the importance of the node. Therefore, a more accurate method to calculate node strength is needed.
       At present, many researchers have proposed different calculation methods of node strength. For example, Katz centrality is a centrality measure based on the interactions between nodes. PageRank is a centrality measurement method based on the link relationship between nodes. Betweenness centrality is a centrality measurement method based on the position and influence of nodes in the network. These methods can all be used to calculate node strength, but they all have some limitations.
      The BBV network is a social network-based model that can simulate the interaction between nodes in a social network. The BBV network model is constructed based on the assumption that in a social network, the interaction between nodes depends on the social relationship between nodes, the similarity between nodes and the influence between nodes. The BBV network model can describe the interaction between these factors and generate a network structure that simulates a social network.
       Assign each node a random attribute vector, where each attribute represents a certain characteristic of the node, such as gender, age, occupation, etc. Calculate the similarity between each pair of nodes. Similarity is computed by computing the cosine similarity between attribute vectors of nodes. Based on the similarity, a random interaction strength is assigned between each pair of nodes.
       Based on the interaction strength, a connectivity matrix is ​​generated, where each element represents the connection strength between nodes. The connectivity matrix is ​​an n x n matrix, where n is the number of nodes.
       Based on the connectivity matrix, a network structure is generated. The network structure is a graph where each node represents a person and each edge represents an interaction between two persons.
      The node strength distribution algorithm is based on the BBV network model, which calculates the strength of each node through the analysis of the network structure and the interaction between nodes, and distributes the node strength. Compute the connectivity of each node. Connectivity is the number of nodes a node is connected to.
      The strength of each node is calculated according to the connectivity and interaction strength of the nodes. The strength of a node is calculated by the weighted sum of the connectivity and interaction strength of the nodes, sorting the strength of all nodes and dividing them into different grades. The number of levels can be adjusted as needed. Count the number of nodes in each level to get the distribution of node strength.
        In order to verify the effectiveness of the node strength distribution algorithm, we conduct experiments on the BBV network model. We used a BBV network model with 1000 nodes and randomly assigned the interaction strength between nodes. We implemented the algorithm using Matlab software and ran 100 experiments on the same computer.

3. MATLAB core program

%初始化
Num    = 16;
C0     = 2;
Weight = C0 - C0*eye(Num);  

for ij = Num:2000
    ij 
    %权值和
    Wsum   = sum(Weight);
    B1     = find(Wsum); 
    B1_L   = length(B1);
    %选择连接
    k      = [0,cumsum(Wsum(B1)/sum(Wsum(B1)))];     
    %选择连接点
    Weight = [Weight,zeros(Num,1)];
    Weight = [Weight;zeros(1,Num+1)];  
    %连接第1个节点
    Per1   = rand; 
    for i=1:B1_L
..................................................................
    end
    %连接第2个节点
    Per2   = rand;
    while(k(i1)<=Per2 & k(i1+1)>Per2)
    Per2   =rand;
    end
    
    for i=1:B1_L
        if(k(i)<=Per2 & k(i+1)>Per2)
          i2=i;
          Weight(Num+1,B1(i2))=C0;
          %增边
          Weight(B1(i2),Num+1)=C0;  
          %权变
          Wsum=sum(Weight);  
          for j=1:Num
              if Weight(B1(i2),j)~=0
                 Weight(B1(i2),j)=Weight(B1(i2),j)+Weight(B1(i2),j)*C0/Wsum(B1(i2));
                 Weight(j,B1(i2))=Weight(j,B1(i2))+Weight(j,B1(i2))*C0/Wsum(B1(i2)); 
              end
          end
          break;
        end
    end
    Num=Num+1;
end

%strengh的分布图
Strengh = tabulate(fix(Wsum));
Index   = find(Strengh(:,3)>0);
Index2  = Index(5:end-5);
figure;
loglog(Strengh(Index2,1),Strengh(Index2,3)/100,'bs',...
    'LineWidth',1,...
    'MarkerSize',6,...
    'MarkerEdgeColor','k',...
    'MarkerFaceColor',[0.2,0.9,0.0]);
title('strengh')
xlabel('S');
ylabel('P/s');
 
 
save R1.mat Strengh Index2
12_045_m

4. Complete algorithm code file

V

Guess you like

Origin blog.csdn.net/hlayumi1234567/article/details/130160834