|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcolibri.method.retrieve.NNretrieval.similarity.local.recommenders.McSherryMoreIsBetter
public class McSherryMoreIsBetter
This function returns the similarity of two numbers following the McSherry - More is Better formulae sim(c.a,q.a)= 1 - ((max(a) - c.a) / (max(a)-min(a))) min(a) and max(a) must be defined by the designer. q.a is not taken into account.
Constructor Summary | |
---|---|
McSherryMoreIsBetter(double maxAttributeValue,
double minAttributeValue)
Constructor. max and min values are ignored for enum types. |
Method Summary | |
---|---|
double |
compute(java.lang.Object caseObject,
java.lang.Object queryObject)
Applies the similarity function. |
boolean |
isApplicable(java.lang.Object o1,
java.lang.Object o2)
Applicable to any Number subinstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public McSherryMoreIsBetter(double maxAttributeValue, double minAttributeValue)
Method Detail |
---|
public double compute(java.lang.Object caseObject, java.lang.Object queryObject) throws NoApplicableSimilarityFunctionException
compute
in interface LocalSimilarityFunction
caseObject
- is a NumberqueryObject
- is a Number
NoApplicableSimilarityFunctionException
public boolean isApplicable(java.lang.Object o1, java.lang.Object o2)
isApplicable
in interface LocalSimilarityFunction
|
GAIA - Group for Artificial Intelligence Applications http://gaia.fdi.ucm.es |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |