Interface SimulationMetric<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 Known Subinterfaces:
- GlobalSimulationMetric<U,I,F>,- IndividualSimulationMetric<U,I,F>
- All Known Implementing Classes:
- AbstractExternalFeatureGlobalSimulationMetric,- AbstractExternalFeatureIndividualSimulationMetric,- AbstractFeatureGlobalKLDivergence,- AbstractFeatureGlobalSimulationMetric,- AbstractFeatureIndividualSimulationMetric,- AbstractFeatureKLDivergence,- AbstractGlobalSimulationMetric,- AbstractIndividualSimulationMetric,- CreatorGlobalEntropy,- CreatorGlobalGiniComplement,- CreatorIndividualEntropy,- CreatorIndividualGiniComplement,- CreatorRecall,- ExternalFeatureGlobalGiniComplement,- ExternalFeatureGlobalRate,- ExternalFeatureIndividualGiniComplement,- ExternalFeatureIndividualRate,- ExternalFeatureRecall,- FeatureGlobalEntropy,- FeatureGlobalGiniComplement,- FeatureGlobalKLDivergence,- FeatureGlobalKLDivergenceInverse,- FeatureGlobalUserEntropy,- FeatureGlobalUserGiniComplement,- FeatureIndividualEntropy,- FeatureIndividualGini,- FeatureIndividualKLDivergence,- FeatureKLDivergenceInverse,- FeatureRecall,- InformationCount,- InformationPieceGiniComplement,- RealPropagatedGlobalRecall,- RealPropagatedRecall,- Speed,- UserFeatureCount,- UserFeatureGiniComplement
public interface SimulationMetric<U extends java.io.Serializable,I extends java.io.Serializable,F>
Interface for the different metrics to apply over the simulation.
- 
Method SummaryModifier and Type Method Description doublecalculate()Calculates the metric for the current state of the simulation.default java.util.List<java.lang.Double>calculate(Data<U,I,F> data, Simulation<U,I,F> simulation)Calculates the metric for each iteration of a simulation.voidclear()Resets the metric.java.lang.StringgetName()Obtains the name of the metric.voidinitialize(Data<U,I,F> data)Initializes the metric.default voidinitialize(Data<U,I,F> data, Simulation<U,I,F> backupSim)Initializes and establishes a given state to the metric from a simulation backup.booleanisInitialized()Indicates if the metric has been initialized or not.voidupdate(Iteration<U,I,F> iteration)Updates the different values which are necessary for computing a metric, given the information received by users in an iteration of the simulation.
- 
Method Details- 
getNamejava.lang.String getName()Obtains the name of the metric.- Returns:
- the name of the metric.
 
- 
isInitializedboolean isInitialized()Indicates if the metric has been initialized or not.- Returns:
- true if it has been initialized, false if it has not.
 
- 
calculatedouble calculate()Calculates the metric for the current state of the simulation.- Returns:
- the value of the metric for the current state of the simulation
 
- 
calculatedefault java.util.List<java.lang.Double> calculate(Data<U,I,F> data, Simulation<U,I,F> simulation)Calculates the metric for each iteration of a simulation.- Parameters:
- data- the data.
- simulation- the whole simulation.
- Returns:
- the value of the metric for each iteration.
 
- 
updateUpdates the different values which are necessary for computing a metric, given the information received by users in an iteration of the simulation.- Parameters:
- iteration- the new iteration.
 
- 
clearvoid clear()Resets the metric.
- 
initializeInitializes the metric.- Parameters:
- data- the data.
 
- 
initializeInitializes and establishes a given state to the metric from a simulation backup.- Parameters:
- data- the data.
- backupSim- the simulation backup.
 
 
-