org.mymedialite.diversification
Class SequentialDiversification

java.lang.Object
  extended by org.mymedialite.diversification.SequentialDiversification

public class SequentialDiversification
extends java.lang.Object

Sequential Diversification. Literature: Cai-Nicolas Ziegler, Sean McNee, Joseph A. Konstan, Georg Lausen: Improving Recommendation Lists Through Topic Diversification. WWW 2005


Field Summary
 CorrelationMatrix itemCorrelations
           
 
Constructor Summary
SequentialDiversification(CorrelationMatrix itemCorrelation)
          Constructor.
 
Method Summary
 java.util.List<java.lang.Integer> diversifySequential(java.util.List<java.lang.Integer> item_list, double diversificationParameter)
          Diversify an item list.
static double similarity(java.util.Collection<java.lang.Integer> items, CorrelationMatrix item_correlation)
          Compute the intra-set similarity of an item collection.
static double similarity(int item_id, java.util.Collection<java.lang.Integer> items, CorrelationMatrix item_correlation)
          Compute similarity between one item and a collection of items.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

itemCorrelations

public CorrelationMatrix itemCorrelations
Constructor Detail

SequentialDiversification

public SequentialDiversification(CorrelationMatrix itemCorrelation)
Constructor.

Parameters:
itemCorrelation - the similarity measure to use for diversification
Method Detail

diversifySequential

public java.util.List<java.lang.Integer> diversifySequential(java.util.List<java.lang.Integer> item_list,
                                                             double diversificationParameter)
Diversify an item list.

Parameters:
item_list - a list of items
diversificationParameter - the diversification parameter (higher means more diverse)
Returns:
a list re-ordered to ensure maximum diversity at the top of the list

similarity

public static double similarity(int item_id,
                                java.util.Collection<java.lang.Integer> items,
                                CorrelationMatrix item_correlation)
Compute similarity between one item and a collection of items.

Parameters:
item_id - the item ID
items - a collection of items
item_correlation - the similarity measure to use
Returns:
the similarity between the item and the collection

similarity

public static double similarity(java.util.Collection<java.lang.Integer> items,
                                CorrelationMatrix item_correlation)
Compute the intra-set similarity of an item collection.

Parameters:
items - a collection of items
item_correlation - the similarity measure to use
Returns:
the intra-set similarity of the collection