|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.indiana.iucbrf.adaptation.Adaptation
edu.indiana.iucbrf.adaptation.DistanceWeightedAdapter
public class DistanceWeightedAdapter
With DistanceWeightedAdapter, the retrieved cases are given
weights directly proportional to their similarity to the problem under
examination. Then, the domain-specific adapter is called according to the
weightedAdapterClassName provided to the constructor. This adapter makes use of the distance-sensitive weights
created by DistanceWeightedAdapter. The domain-specific adapter could, for
example, be based on a WeightedAverageAdapter, or a WeightedMajorityAdapter.
Field Summary |
---|
Fields inherited from class edu.indiana.iucbrf.adaptation.Adaptation |
---|
debugMode, wts |
Constructor Summary | |
---|---|
protected |
DistanceWeightedAdapter()
Used for serialization only. |
|
DistanceWeightedAdapter(java.lang.String weightedAdapterClassName)
Creates new DistanceWeightedAdapter. |
|
DistanceWeightedAdapter(java.lang.String weightedAdapterClassName,
boolean debugMode)
Creates new DistanceWeightedAdapter |
Method Summary | |
---|---|
Solution |
adaptTo(RetrievalResults retrieved,
Problem currentProblem,
Domain domain)
Adapt the retrieved cases to get a solution to the current problem. |
protected double[] |
calculateWeightsFromDifferences(double[] differences)
Calculate appropriate weights (adaptation influence) for cases with given differences from the current problem. |
Methods inherited from class edu.indiana.iucbrf.adaptation.Adaptation |
---|
setDebugMode, setWeights |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DistanceWeightedAdapter()
public DistanceWeightedAdapter(java.lang.String weightedAdapterClassName)
weightedAdapterClassName
- The String indicating the weighted adapter class to be used. It will be provided with weights based on the distance of the retrieved cases from the current problem.public DistanceWeightedAdapter(java.lang.String weightedAdapterClassName, boolean debugMode)
weightedAdapterClassName
- The String indicating the weighted adapter class to be used. It will be provided with weights based on the distance of the retrieved cases from the current problem.debugMode
- Set to true to print debugging information, false otherwise.Method Detail |
---|
public Solution adaptTo(RetrievalResults retrieved, Problem currentProblem, Domain domain)
adaptTo
in class Adaptation
retrieved
- A RetrievalResults of Case objects, in order from smallest difference to largest.currentProblem
- The problem the system is currently trying to solve.domain
- The domain in which the adaptation is taking place.
protected double[] calculateWeightsFromDifferences(double[] differences)
differences
- The differences of the cases from the problem.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |