java.lang.Object
es.uam.eps.ir.relison.links.recommendation.metrics.novdiv.ILD<U,​I>
Type Parameters:
U - type of the users.
I - type of the items.
All Implemented Interfaces:
es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>

public class ILD<U,​I>
extends java.lang.Object
implements es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>
Global version of EILD.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private int cutoff
    The cutoff for each recommendation.
    private es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> distModel
    A model for the distances between items.
    private java.util.List<es.uam.eps.ir.ranksys.core.Recommendation<U,​I>> list
    A list of recommendations.
  • Constructor Summary

    Constructors 
    Constructor Description
    ILD​(int cutoff, es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> distModel)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void add​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> r)  
    void combine​(es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I> sm)  
    double evaluate()  
    void reset()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • list

      private java.util.List<es.uam.eps.ir.ranksys.core.Recommendation<U,​I>> list
      A list of recommendations.
    • cutoff

      private final int cutoff
      The cutoff for each recommendation.
    • distModel

      private final es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> distModel
      A model for the distances between items.
  • Constructor Details

    • ILD

      public ILD​(int cutoff, es.uam.eps.ir.ranksys.novdiv.distance.ItemDistanceModel<I> distModel)
      Constructor.
      Parameters:
      cutoff - maximum length of recommendation lists to evaluate
      distModel - item distance model
  • Method Details

    • add

      public void add​(es.uam.eps.ir.ranksys.core.Recommendation<U,​I> r)
      Specified by:
      add in interface es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>
    • evaluate

      public double evaluate()
      Specified by:
      evaluate in interface es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>
    • combine

      public void combine​(es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I> sm)
      Specified by:
      combine in interface es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>
    • reset

      public void reset()
      Specified by:
      reset in interface es.uam.eps.ir.ranksys.metrics.SystemMetric<U,​I>