Class FeatureGlobalKLDivergence<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 FeatureGlobalKLDivergence<U extends java.io.Serializable,​I extends java.io.Serializable,​F>
extends AbstractFeatureGlobalKLDivergence<U,​I,​F>
This global metric computes the number of bytes of information we expect to lose if we approximate the real distribution of features with the estimated distribution obtained from simulating. It uses KL Divergence for that.
  • Field Details

  • Constructor Details

    • FeatureGlobalKLDivergence

      public FeatureGlobalKLDivergence​(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

    • calculate

      public double calculate()
      Description copied from interface: SimulationMetric
      Calculates the metric for the current state of the simulation.
      Returns:
      the value of the metric for the current state of the simulation