Class ExternalFeatureGlobalGiniComplement<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 user / information pieces features.
All Implemented Interfaces:
GlobalSimulationMetric<U,​I,​F>, SimulationMetric<U,​I,​F>

public class ExternalFeatureGlobalGiniComplement<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
extends AbstractExternalFeatureGlobalSimulationMetric<U,​I,​F>
Metric that computes the complement of the Gini coefficient over the different features unknown to the different users. It provides a measure of the balance of the distribution of times each feature has been received. If we use information pieces features (i.e. hashtags) the (user, feature) value counts the number of times that the user has received information pieces using that feature. In case we use user features, it is just how many times the user has received information from users with that feature.
  • Field Details

    • GLOBALGINI

      private static final java.lang.String GLOBALGINI
      Name fixed value.
      See Also:
      Constant Field Values
    • values

      private final java.util.Map<F,​java.lang.Double> values
      Times each feature has been received.
    • sum

      private double sum
      The total number of external features that have reached the different users.
    • count

      private int count
      The number of different features.
    • unique

      private final boolean unique
      Indicates if a piece of information is considered once (or each time it appears if false).
  • Constructor Details

    • ExternalFeatureGlobalGiniComplement

      public ExternalFeatureGlobalGiniComplement​(java.lang.String feature, boolean userFeat, boolean unique)
      Constructor.
      Parameters:
      userFeat - true if we are using a user feature, false if we are using an information piece feature.
      feature - the name of the feature.
      unique - true if a piece of information is considered once, false if it is considered each time it appears.
  • Method Details