<jupyter_start><jupyter_text>RandomMatrix: How to use<jupyter_code>%matplotlib inline
#from mlab.releases import latest_release as matlab
import matplotlib
import numpy as np
import matplotlib.image as mpimg
import matplotlib.pyplot as plt

from plotly.offline import download_plotlyjs, init_notebook_mode, iplot
init_notebook_mode(True)
import plotly.graph_objs as go
from IPython.display import Image

%reload_ext autoreload
%autoreload 1
%aimport util<jupyter_output><empty_output><jupyter_text>This is a notebook example of how to use the RandomMatrix code for multifractality in complex networks. The code is developed in MATLAB, and some toolboxes are necessary to run the commands.  This is a Python interface for illustrative purpose of using and calling the commandsYou run the MATLAB functions in bash/shell prompt as follow:    matlab -nodisplay -nodesktop -nosplash -r "try; yourMATLABFunction(your parameters); catch; end; quit" Note: `matlab` is the environment variable in your system that calls the MATLAB program. Here, because of the Python interface, we prefix the command `%system`. But, do not need it if you run directly in the shell.  Functions The `getEtaUGraph` function shows the relative fluctations of the participation numbers ($\eta$) as a function of $\mu$ given the parameters[PointsVar] = getEtaUGraph(Q,B,U,Ns,a)<jupyter_code># Q: is for a specific q value
# B: the specific band
# U: the set of evaluation points for the participation numbers (x-axis)
# Ns: this is the vector of expoente network size, in the form 2^Ns[i]
# A: this is the sparcity parameter of the Power-Law Banded Random Matrix (PBRM) model.<jupyter_output><empty_output><jupyter_text>Example of how to call the getEtaUGraph function<jupyter_code>%system matlab -nodisplay -nodesktop -nosplash -r "try; RandomMatrix.getEtaUGraph([2],[1],[0.6, 0.9, 1.0, 1.1],[6,7,8,9],1.0); catch; end; quit"

#just for visualizing the image here
Image(url = 'sBaFigure.png')<jupyter_output><empty_output><jupyter_text>It presents the curves of $\eta$ vs $\mu$ for the dPBRM model with sparsity values $\alpha$ = 1 (no sparsity). The critical point is when the lines intercept.  Remember, the `%system` command is only for the purpose of running here in this notebook. The next function calculates the fractal dimensions of our studied model (dPBRM) and prints the figure, i.e, the signature of the multifractality of eigenfunctions of our network model. [Data, eData] = getDqAlphaGraphMAT(Q,B,u,Ns,A)<jupyter_code># Q: is a vector of all the points (y-axis Figure XX of the paper)
# B: this is a vector for all the band values to be calculated
# u: it is the critical point u_c
# Ns: this is the vector of expoente network size, in the form 2^Ns[i]
# A: this is the sparcity parameter of the Power-Law Banded Random Matrix (PBRM) model.<jupyter_output><empty_output><jupyter_text>Example of how to call the getDqAlphaGraphMAT function<jupyter_code>%system matlab -nodisplay -nodesktop -nosplash -r "try; RandomMatrix.getDqAlphaGraphMAT([0.5,1,1.5,2,3,4,5],[1],1,[6,7,8,9],[0.3,1.0]); catch; end; quit"

#Remember, the `%system` command is only for the purpose of running here in this notebook.

#just for visualizing the image here
Image(url = 'DqVSq.png')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0855222968845449, 'fraction_numerical': 0.011912034208918754, 'mean_word_length': 5.576305220883534, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '368262', 'license': 'MIT', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1023, 'n_words': 420, 'path': '.ipynb_checkpoints/RandomMatrixTutorial-checkpoint.ipynb', 'repo_name': 'didiervega/RandomMatrix', 'size': '3274'}