How to create real random matrices representing real social network
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Greetings and Salutations!
I'm looking to create a 1000 by 1000 matrix where it is somehow close to a real random social network. In this graph manyare somewhat have low degrees, there are a portion of nodes with very high degree (hubs). Now I'm not looking for exact results but rather some approximation.
I tried the simple code Ge=round(rand(n)) which is not helpful at all. Two main problems:
1)The avg degree it gives is around 700 and the min degree usually varies from 500 to 700, which is very high! (I'm looking to tone it down a bit)
2) Also the random matrices it gives seems like not that much different in different runs (in terms of avg degree, max degree and min degree.)
Any help is greatly appreciated.
Thank you and stay safe!
0 Commenti
Risposte (1)
Ameer Hamza
il 1 Apr 2020
How do you define the degree of matrix in this context? You can control the average number of 1s in the matrix like this
M = rand(1000) < 0.1;
will have an average of 0.1.
Also see sprand which generate sparse matrix to save space since most of the numbers are zero
q = sprand(1000, 1000, 0.1) > 0;
0 Commenti
Vedere anche
Categorie
Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!