jcolibri.extensions.recommendation.navigationByAsking
Class InformationGain

java.lang.Object
  extended by jcolibri.extensions.recommendation.navigationByAsking.InformationGain
All Implemented Interfaces:
SelectAttributeMethod

public class InformationGain
extends java.lang.Object
implements SelectAttributeMethod

Selects an attribute with the highest information gain.

See:

R. Bergmann. Experience Management: Foundations, Development Methodology, and Internet-Based Applications. Springer-Verlag New York, Inc.,Secaucus, NJ, USA, 2002.

S. Schulz. CBR-works: A state-of-the-art shell for case-based application building. In E. Melis, editor, Proceedings of the 7th German Workshop on Case-Based Reasoning, GWCBR'99, Würzburg, Germany, pages 166-175. University of Würzburg, 1999.

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

Constructor Summary
InformationGain(java.util.Collection<CBRCase> completeset)
          Constructor.
 
Method Summary
 Attribute getAttribute(java.util.Collection<CBRCase> cases, CBRQuery query)
          Selects the attribute to be asked
static Attribute getMoreIGattribute(java.util.Collection<CBRCase> cases, boolean init, java.util.Collection<CBRCase> completeSetOfCases)
          Selects an attribute with the highest information gain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InformationGain

public InformationGain(java.util.Collection<CBRCase> completeset)
Constructor.

Parameters:
completeset - is the original set of cases, used when there is not IG
Method Detail

getMoreIGattribute

public static Attribute getMoreIGattribute(java.util.Collection<CBRCase> cases,
                                           boolean init,
                                           java.util.Collection<CBRCase> completeSetOfCases)
                                    throws ExecutionException
Selects an attribute with the highest information gain.

Parameters:
cases - are the working cases
init - indicates if this is the first time that the algorithm is executed. This way, in following iterations past chosen attributes are not computed.
completeSetOfCases - is the original case set used when there are not attributes with any information gain. This way, the method starts again with all the cases.
Returns:
the selected attribute or null if there are not more attributes to ask.
Throws:
ExecutionException

getAttribute

public Attribute getAttribute(java.util.Collection<CBRCase> cases,
                              CBRQuery query)
                       throws ExecutionException
Selects the attribute to be asked

Specified by:
getAttribute in interface SelectAttributeMethod
Parameters:
cases - list of working cases
query - is the current query
Returns:
selected attribute
Throws:
ExecutionException

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