scicom.utilities.statistics =========================== .. py:module:: scicom.utilities.statistics .. autoapi-nested-parse:: Prune a network. Classes ------- .. autoapisummary:: scicom.utilities.statistics.PruneNetwork Functions --------- .. autoapisummary:: scicom.utilities.statistics.prune Module Contents --------------- .. py:class:: PruneNetwork(dataframe) Create statistics for communication networks by deletion. For a given dataset with sender and receiver information, create a weighted network with igraph. For a given number of iterations, deletion amounts, and deletion types, the algorithm then generates network statistics for randomly sampled subnetworks. .. py:attribute:: inputDF .. py:method:: makeNet(dataframe) Create network from dataframe. Assumes the existence of sender, receiver and step column names. .. py:method:: setSurvivalProb(graph, *, method = 'agents', ranked = True) Generate probabilities for different survival modes. .. py:method:: scaleSurvivalProb(probabilities, *, method = 'agents') Scale survival for methods agents and regions. .. py:method:: basicNetStats(graph) Generate base statistics of network. .. py:method:: netStats(G) Generate network statistics. .. py:method:: deleteFromNetwork(iterations = 10, delAmounts = (0.1, 0.25, 0.5, 0.75, 0.9), delTypes = ('unif', 'log_normal1', 'exp', 'beta', 'log_normal2', 'log_normal3'), delMethod = ('agents', 'regions', 'time'), rankedVals = (True, False)) Run the deletion by sampling. .. py:function:: prune(modelparameters, network, columns, iterations = 10, delAmounts = (0.1, 0.25, 0.5, 0.75, 0.9), delTypes = ('unif', 'log_normal1', 'exp', 'beta', 'log_normal2', 'log_normal3'), delMethod = ('agents', 'regions', 'time'), rankedVals = (True, False)) Generate pruned networks from input. Assumes existence of columns "sender", "receiver", "sender_location", "receiver_location" and "step".