Interface IndividualSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
- Type Parameters:
U- type of the users.I- type of the information pieces.F- type of the features.
- All Superinterfaces:
SimulationMetric<U,I,F>
- All Known Implementing Classes:
AbstractExternalFeatureIndividualSimulationMetric,AbstractFeatureIndividualSimulationMetric,AbstractFeatureKLDivergence,AbstractIndividualSimulationMetric,CreatorIndividualEntropy,CreatorIndividualGiniComplement,CreatorRecall,ExternalFeatureIndividualGiniComplement,ExternalFeatureIndividualRate,ExternalFeatureRecall,FeatureIndividualEntropy,FeatureIndividualGini,FeatureIndividualKLDivergence,FeatureKLDivergenceInverse,FeatureRecall,InformationCount,RealPropagatedRecall
public interface IndividualSimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F> extends SimulationMetric<U,I,F>
Interface for the different individual metrics (can be applied over individual
users) to apply over the simulation.
-
Method Summary
Modifier and Type Method Description doublecalculate(U user)Calculates the metric value for a single user.default java.util.List<java.lang.Double>calculate(U user, Simulation<U,I,F> simulation)Calculates the metric for a single user on each iteration of a simulation.java.util.Map<U,java.lang.Double>calculateIndividuals()Calculates the metric for each individual in the network.default java.util.List<java.util.Map<U,java.lang.Double>>calculateIndividuals(Simulation<U,I,F> simulation)Calculates the metric for each individual user on each iteration of a simulation.Methods inherited from interface es.uam.eps.ir.relison.diffusion.metrics.SimulationMetric
calculate, calculate, clear, getName, initialize, initialize, isInitialized, update
-
Method Details
-
calculateIndividuals
java.util.Map<U,java.lang.Double> calculateIndividuals()Calculates the metric for each individual in the network.- Returns:
- a map containing the values of the metric for each user.
-
calculateIndividuals
default java.util.List<java.util.Map<U,java.lang.Double>> calculateIndividuals(Simulation<U,I,F> simulation)Calculates the metric for each individual user on each iteration of a simulation.- Parameters:
simulation- the whole simulation.- Returns:
- the value of the metric for each iteration.
-
calculate
Calculates the metric value for a single user.- Parameters:
user- the single user.- Returns:
- the value of the metric, NaN if something failed.
-
calculate
Calculates the metric for a single user on each iteration of a simulation.- Parameters:
user- the user.simulation- the whole simulation- Returns:
- the value of the metric for that user in each iteration.
-