jcolibri.method.retrieve.selection.diversity
Class GreedySelection

java.lang.Object
  extended by jcolibri.method.retrieve.selection.diversity.GreedySelection

public class GreedySelection
extends java.lang.Object

This method incrementally builds a retrieval set, R. During each step the remaining cases are ordered according to their quality with the highest quality case added to R.
The quality metric combines diversity and similarity. The quality of a case c is proportional to the similarity between c and the query, and to the diversity of c relative to those cases so far selected in R.
This algorithm is very expensive. It should be applied to small case bases.

See:

B. Smyth and P. McClave. Similarity vs. diversity. In ICCBR '01: Proceedings of the 4th International Conference on Case-Based Reasoning, pages 347-361, London, UK, 2001. Springer-Verlag.

Version:
1.0
Author:
Juan A. Recio-Garcia, Developed at University College Cork (Ireland) in collaboration with Derek Bridge.

Constructor Summary
GreedySelection()
           
 
Method Summary
static CBRCase getMoreQuality(CBRQuery query, java.util.Collection<CBRCase> cases, java.util.Collection<CBRCase> R, NNConfig simConfig)
          Returns the case with more quality.
static java.util.Collection<CBRCase> greedySelection(java.util.Collection<RetrievalResult> cases, CBRQuery query, NNConfig simConfig, int k)
          Executes the greedy selection algorithm
static double relDiversity(CBRCase c, java.util.Collection<CBRCase> R, NNConfig simConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreedySelection

public GreedySelection()
Method Detail

greedySelection

public static java.util.Collection<CBRCase> greedySelection(java.util.Collection<RetrievalResult> cases,
                                                            CBRQuery query,
                                                            NNConfig simConfig,
                                                            int k)
Executes the greedy selection algorithm

Parameters:
cases - to select from
query - to compare
simConfig - is the knn similarity configuration. Its k determines the number of returned cases
Returns:
k cases (k is defined in simConfig).

getMoreQuality

public static CBRCase getMoreQuality(CBRQuery query,
                                     java.util.Collection<CBRCase> cases,
                                     java.util.Collection<CBRCase> R,
                                     NNConfig simConfig)
Returns the case with more quality.

Parameters:
query - to compare
cases - to compare
R - is the set of previous selected cases
simConfig - is the knn similarity config
Returns:
the case with more quality

relDiversity

public static double relDiversity(CBRCase c,
                                  java.util.Collection<CBRCase> R,
                                  NNConfig simConfig)

GAIA - Group for Artificial Intelligence Applications
http://gaia.fdi.ucm.es