balance_of_contacts

bandicoot.individual.balance_of_contacts(records, weighted=True)

The balance of interactions per contact. For every contact, the balance is the number of outgoing interactions divided by the total number of interactions (in+out).

\[\forall \,\text{contact}\,c,\;\text{balance}\,(c) = \frac{\bigl|\text{outgoing}\,(c)\bigr|}{\bigl|\text{outgoing}\,(c)\bigr|+\bigl|\text{incoming}\,(c)\bigr|}\]
Parameters:
weighted : str, optional

If True, the balance for each contact is weighted by the number of interactions the user had with this contact.