egonetworks.core – Basic ego network classes and functions

This is the main module of the package and contains the basic ego network models and functions for ego network analysis.

The main class of the module is the abstract class egonetworks.core.EgoNetwork. This contains the data structures to represent generic social relationship between people (specified by a list of alter identifiers and the frequencies of contact between the ego and these alters). In addition, the class provides the main methods for the static and dynamic analysis of ego networks. For example, egonetworks.core.EgoNetwork.get_optimal_num_circles returns the optimal number of ego network circles of the ego network, and egonetworks.core.EgoNetwork.get_circles_properties returns the properties of the circles given their number a priori.

Note that egonetworks.core.EgoNetwork cannot be instantiated directly. Its main implementation, within this module, are egonetworks.core.FrequencyEgoNetwork and egonetworks.core.ContactEgoNetwork. The former class implements methods to add relationships to the ego network by specifying contact frequencies directly, whereas the latter implements methods to add single social contacts (i.e. interactions involving communication between the ego and the alters such as text messages or online posts) to the ego network. In egonetworks.core.ContactEgoNetwork, contact frequencies are calculated automatically from social contacts.

These are the definitions of the objects returned (or required as arguments) by some of the methods of the classes in this module: