Class LimitedProportionThresholdSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
java.lang.Object
es.uam.eps.ir.relison.diffusion.selections.AbstractSelectionMechanism<U,I,P>
es.uam.eps.ir.relison.diffusion.selections.CountSelectionMechanism<U,I,P>
es.uam.eps.ir.relison.diffusion.selections.LimitedProportionThresholdSelectionMechanism<U,I,P>
- Type Parameters:
U
- type of the users.I
- type of the information pieces.P
- type of the parameters.
- All Implemented Interfaces:
SelectionMechanism<U,I,P>
public class LimitedProportionThresholdSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P> extends CountSelectionMechanism<U,I,P>
Selection mechanism that only propagates those received pieces which have been received (at least) a fixed
number of times. It propagates any information piece that the user has received, from, at least, a
given proportion of his neighbors.
Reference: D. Kempe, J. Kleinberg, and E. Tardos. Maximizing the spread of influence through a social network, KDD 2003, pp. 137–146 (2003).
It fixes the (maximum) number of received pieces to propagate.-
Field Summary
Fields Modifier and Type Field Description private EdgeOrientation
orientation
Orientation for selecting the neighborhood.private double
threshold
Proportion of users that transmit an information piece before it is released. -
Constructor Summary
Constructors Constructor Description LimitedProportionThresholdSelectionMechanism(int numOwn, int numRec, double threshold, EdgeOrientation orientation)
Constructor.LimitedProportionThresholdSelectionMechanism(int numOwn, int numRec, double threshold, EdgeOrientation orientation, int numRepr)
-
Method Summary
Modifier and Type Method Description protected java.util.List<PropagatedInformation>
getReceivedInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)
Obtains the list of received information pieces to repropagate.Methods inherited from class es.uam.eps.ir.relison.diffusion.selections.CountSelectionMechanism
getNumOwn, getNumReceived, getNumRepropagate, getOwnInformation, getPropagatedInformation, getRepropagatedInformation
Methods inherited from class es.uam.eps.ir.relison.diffusion.selections.AbstractSelectionMechanism
getSelectableUsers, select
-
Field Details
-
threshold
private final double thresholdProportion of users that transmit an information piece before it is released. -
orientation
Orientation for selecting the neighborhood.
-
-
Constructor Details
-
LimitedProportionThresholdSelectionMechanism
public LimitedProportionThresholdSelectionMechanism(int numOwn, int numRec, double threshold, EdgeOrientation orientation)Constructor.- Parameters:
numOwn
- number of own pieces to propagate.numRec
- maximum number of received pieces to propagate.threshold
- proportion of neighbors that have to propagate an information piece before a user chooses to share it.orientation
- orientation for selecting the number of neighbors to consider.
-
LimitedProportionThresholdSelectionMechanism
public LimitedProportionThresholdSelectionMechanism(int numOwn, int numRec, double threshold, EdgeOrientation orientation, int numRepr)- Parameters:
numOwn
- number of own pieces to propagate.numRec
- maximum number of received pieces to propagate.threshold
- proportion of neighbors that have to propagate an information piece before a user chooses to share it.orientation
- orientation for selecting the number of neighbors to consider.numRepr
- number of pieces to repropagate.
-
-
Method Details
-
getReceivedInformation
protected java.util.List<PropagatedInformation> getReceivedInformation(UserState<U> user, Data<U,I,P> data, SimulationState<U,I,P> state, int numIter, java.lang.Long timestamp)Description copied from class:AbstractSelectionMechanism
Obtains the list of received information pieces to repropagate.- Overrides:
getReceivedInformation
in classCountSelectionMechanism<U extends java.io.Serializable,I extends java.io.Serializable,P>
- Parameters:
user
- the user to analyze.data
- the full data.state
- the iteration number.numIter
- number of the iteration.timestamp
- the timestamp for the current simulation.- Returns:
- a selection of the received information pieces to be propagated.
-