001package es.ucm.fdi.gaia.jcolibri.method.reuse.classification;
002
003import java.util.Collection;
004
005import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRCase;
006import es.ucm.fdi.gaia.jcolibri.cbrcore.CBRQuery;
007import es.ucm.fdi.gaia.jcolibri.extensions.classification.ClassificationSolution;
008import es.ucm.fdi.gaia.jcolibri.method.retrieve.RetrievalResult;
009
010/**
011 * Interface for providing the ability to classify a 
012 * query by predicting its solution from supplied cases.
013 * 
014 * @author Derek Bridge
015 * @author Lisa Cummins
016 * 16/05/07
017 */
018public interface KNNClassificationMethod
019{
020    /**
021     * Gets the predicted solution of the given cases according 
022     * to the classification type.
023     * @param cases a list of cases along with similarity scores.
024     * @return Returns the predicted solution.
025     */
026    ClassificationSolution getPredictedSolution(Collection<RetrievalResult> cases);
027    
028    /**
029     * Gets the predicted solution of the given cases according 
030     * to the classification type and returns a case that has the
031     * query description and the predicted solution.
032     * @param query the query.
033     * @param cases a list of cases along with similarity scores.
034     * @return Returns a case with the query description as its 
035     * description and the predicted solution as its solution. 
036     */
037    CBRCase getPredictedCase(CBRQuery query, Collection<RetrievalResult> cases);
038}