cbr.framework
Class TargetFeature

java.lang.Object
  extended by cbr.framework.Feature
      extended by cbr.framework.TargetFeature

public class TargetFeature
extends Feature

This class represents a target case feature. It differs from a normal feature in that a similarity metric and weight is specified to be used during the retrieval process. It can only be used with TargetCases.


Constructor Summary
TargetFeature(String name, Value value, SimilarityMetric sm, double weight)
          Create a feature for a target case.
 
Method Summary
 SimilarityMetric getSimilarityMetric()
          Get the SimilarityMetric to be used for this feature.
 double getWeight()
          Get the feature's weighting.
 void setSimilarityMetric(SimilarityMetric similarityMetric)
          Set the SimilarityMetric to be used for this feature.
 void setWeight(double weight)
          Set the feature's weighting.
 
Methods inherited from class cbr.framework.Feature
getName, getValueAsString, isIndexed, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TargetFeature

public TargetFeature(String name,
                     Value value,
                     SimilarityMetric sm,
                     double weight)
Create a feature for a target case.

Parameters:
name - the name of the feature
value - the feature's value
sm - the similarity metric to use
weight - the feature's weight
Method Detail

getSimilarityMetric

public SimilarityMetric getSimilarityMetric()
Get the SimilarityMetric to be used for this feature.

Returns:
the SimilarityMetric

setSimilarityMetric

public void setSimilarityMetric(SimilarityMetric similarityMetric)
Set the SimilarityMetric to be used for this feature.

Parameters:
similarityMetric - the SimilarityMetric

getWeight

public double getWeight()
Get the feature's weighting.

Returns:
the weight value

setWeight

public void setWeight(double weight)
Set the feature's weighting.

Parameters:
weight - the weight value