Class FeatureGlobalKLDivergenceInverse<U extends java.io.Serializable,​I extends java.io.Serializable,​P>

Type Parameters:
U - type of the users.
I - type of the information pieces.
P - type of the parameters.
All Implemented Interfaces:
GlobalSimulationMetric<U,​I,​P>, SimulationMetric<U,​I,​P>

public class FeatureGlobalKLDivergenceInverse<U extends java.io.Serializable,​I extends java.io.Serializable,​P>
extends AbstractFeatureGlobalKLDivergence<U,​I,​P>
This global metric computes the number of bytes of information we expect to lose if we approximate the observed distribution of the parameters with their prior distribution (i.e. how many times have they appeared over the different information pieces). We apply a Laplace smoothing to prevent divisions by zero in both distributions.
  • Field Details

  • Constructor Details

    • FeatureGlobalKLDivergenceInverse

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