|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.indiana.iucbrf.retrieval.AbstractRetrieval edu.indiana.iucbrf.retrieval.kNN
public class kNN
kNN implements k-Nearest Neighbor. According to a domain-specific similarity criteria, the k nearest cases are returned, in order. These can subsequently be sent to an adaptation technique.
Field Summary | |
---|---|
protected int |
k
k is the number of cases that are retrieved. |
Fields inherited from class edu.indiana.iucbrf.retrieval.AbstractRetrieval |
---|
conditionsChecker, debugMode, problemDifferentiator |
Constructor Summary | |
---|---|
protected |
kNN()
|
|
kNN(Domain domain,
int k)
Creates new kNN. |
|
kNN(ProblemDifferentiator problemDifferentiator,
int k)
Creates new kNN. |
Method Summary | |
---|---|
int |
getK()
Get the value of k. |
RetrievalResults |
getNearest(java.util.Iterator caseIter,
Problem p,
Context currentContext,
java.util.Collection specialIndices)
Get the k cases in the case base nearest to a problem. |
void |
setParams(java.lang.Object[] params)
|
Methods inherited from class edu.indiana.iucbrf.retrieval.AbstractRetrieval |
---|
getConditionsChecker, getDebugMode, getNearest, getNearest, getNearest, getProblemDifferentiator, handleDebugMode, setConditionsChecker, setDebugMode, setProblemDifferentiator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int k
Constructor Detail |
---|
protected kNN()
public kNN(Domain domain, int k)
k
- The number of cases to retrieve.public kNN(ProblemDifferentiator problemDifferentiator, int k)
k
- The number of cases to retrieve.Method Detail |
---|
public void setParams(java.lang.Object[] params)
public int getK()
public RetrievalResults getNearest(java.util.Iterator caseIter, Problem p, Context currentContext, java.util.Collection specialIndices)
getNearest
in interface Retrieval
getNearest
in class AbstractRetrieval
caseIter
- An iterator on the case base (or set of cases to be considered).p
- The current problem
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |