001 package jcolibri.method.reuse.classification; 002 003 import java.util.Collection; 004 005 import jcolibri.cbrcore.CBRCase; 006 import jcolibri.cbrcore.CBRQuery; 007 import jcolibri.extensions.classification.ClassificationSolution; 008 import 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 */ 018 public 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 public 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 public CBRCase getPredictedCase(CBRQuery query, Collection<RetrievalResult> cases); 038 }