BoundedConfidence
-
class
defSim.influence_sim.BoundedConfidence.
BoundedConfidence
(regime: str, **kwargs) Bases:
defSim.influence_sim.influence_sim.InfluenceOperator
-
__init__
(regime: str, **kwargs) - Parameters
regime – Either “one-to-one”, “one-to-many” or “many-to-one”
kwargs – Additional parameters specific to the implementation of the InfluenceOperator. Possible parameters are the following:
confidence_level (float=0.8) – A number between 0 and 1 determining the cutoff value for the dissimilarity at which agents do not interact anymore. 1 means that even the most dissimilar agents still interact, 0 means no interaction.Passed as a kwargs argument.
convergence_rate (float=0.5) – A number between 0 and 1 determining how much an agent adopts other agents features. If it is one, the influenced agent takes the value of the influencing agent. Passed as a kwargs argument.
bi_directional (bool=False) – A boolean specifying whether influence is bi- or uni-directional.
-
spread_influence
(network: networkx.classes.graph.Graph, agent_i: int, agents_j: List[int], dissimilarity_measure: defSim.dissimilarity_component.dissimilarity_calculator.DissimilarityCalculator, attributes: Optional[List[str]] = None, **kwargs) → bool The bounded confidence model is from the family of similarity bias models. These models assume that how strongly agents influence each other is dependent on how similar they are. In the bounded confidence case the influence ‘strength’ is either the ‘convergence-rate’ or 0, if the agents are more similar than the threshold ‘confidence_level’ or below it, respectively. In the one-to-one communication regime, the agents can also influence each other if the ‘bi-directional’ parameter is set to true.
- Parameters
network – The network in which the agents exist.
agent_i – the index of the focal agent that is either the source or the target of the influence
agents_j – A list of indices of the agents who can be either the source or the targets of the influence. The list can have a single entry, implementing one-to-one communication.
attributes – A list of the names of all the attributes that are subject to influence. If an agent has e.g. the attributes “Sex” and “Music taste”, only supply [“Music taste”] as a parameter for this function. The influence function itself can still be a function of the “Sex” attribute.
dissimilarity_measure – An instance of a
DissimilarityCalculator
.
- Returns
true if agent(s) were successfully influenced
-
References
- Deffuant2000
Deffuant, G., Neau, D., Amblard, F., & Weisbuch, G. (2000). Mixing beliefs among interacting agents. Advances in Complex Systems, 03(01n04), 87–98. https://doi.org/10.1142/S0219525900000078