jcolibri.method.reuse.classification
Class AbstractKNNClassificationMethod

java.lang.Object
  extended by jcolibri.method.reuse.classification.AbstractKNNClassificationMethod
All Implemented Interfaces:
KNNClassificationMethod
Direct Known Subclasses:
MajorityVotingMethod, SimilarityWeightedVotingMethod, UnanimousVotingMethod

public abstract class AbstractKNNClassificationMethod
extends java.lang.Object
implements KNNClassificationMethod

Provides the ability to classify a query by predicting its solution from supplied cases.

Author:
Derek Bridge, Lisa Cummins 16/05/07

Constructor Summary
AbstractKNNClassificationMethod()
           
 
Method Summary
 CBRCase getPredictedCase(CBRQuery query, java.util.Collection<RetrievalResult> cases)
          Gets the predicted solution of the given cases according to the classification type and returns a case that has the query description and the predicted solution.
abstract  ClassificationSolution getPredictedSolution(java.util.Collection<RetrievalResult> cases)
          Gets the predicted solution of the given cases according to the classification type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractKNNClassificationMethod

public AbstractKNNClassificationMethod()
Method Detail

getPredictedSolution

public abstract ClassificationSolution getPredictedSolution(java.util.Collection<RetrievalResult> cases)
Gets the predicted solution of the given cases according to the classification type.

Specified by:
getPredictedSolution in interface KNNClassificationMethod
Parameters:
cases - a list of cases along with similarity scores.
Returns:
Returns the predicted solution.

getPredictedCase

public CBRCase getPredictedCase(CBRQuery query,
                                java.util.Collection<RetrievalResult> cases)
Gets the predicted solution of the given cases according to the classification type and returns a case that has the query description and the predicted solution.

Specified by:
getPredictedCase in interface KNNClassificationMethod
Parameters:
query - the query.
cases - a list of cases along with similarity scores.
Returns:
Returns a case with the query description as its description and the predicted solution as its solution.

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