es.upv.dsic.gti_ia.argAgents
Class SimilarityAlgorithms

java.lang.Object
  extended by es.upv.dsic.gti_ia.argAgents.SimilarityAlgorithms

public class SimilarityAlgorithms
extends Object

This class contains algorithms to calculate similarity measures between cases.

Author:
Jaume Jordan

Constructor Summary
SimilarityAlgorithms()
           
 
Method Summary
static ArrayList<SimilarDomainCase> normalizedEuclideanSimilarity(HashMap<Integer,Premise> premises, ArrayList<DomainCase> candidateCases)
          Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases.
static ArrayList<SimilarDomainCase> normalizedTverskySimilarity(HashMap<Integer,Premise> premises, ArrayList<DomainCase> candidateCases)
          Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases.
static ArrayList<SimilarDomainCase> weightedEuclideanSimilarity(HashMap<Integer,Premise> premises, ArrayList<DomainCase> candidateCases)
          Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimilarityAlgorithms

public SimilarityAlgorithms()
Method Detail

normalizedEuclideanSimilarity

public static ArrayList<SimilarDomainCase> normalizedEuclideanSimilarity(HashMap<Integer,Premise> premises,
                                                                         ArrayList<DomainCase> candidateCases)
Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases. The similarity is calculated using normalized Euclidean distance among the premises.

Parameters:
premises - HashMap of Premise to calculate the similarity with the candidate domain-cases
candidateCases - The domain-cases that can be similar to the domain-case to solve
Returns:
A SimilarDomainCase ArrayList with the candidate domain-cases and its similarity degree to the domain-case to solve

weightedEuclideanSimilarity

public static ArrayList<SimilarDomainCase> weightedEuclideanSimilarity(HashMap<Integer,Premise> premises,
                                                                       ArrayList<DomainCase> candidateCases)
Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases. The similarity is calculated using weighted Euclidean distance among the premises.

Parameters:
premises - HashMap of Premise to calculate the similarity with the candidate domain-cases
candidateCases - The domain-cases that can be similar to the domain-case to solve
Returns:
A SimilarDomainCase ArrayList with the candidate domain-cases and its similarity degree to the domain-case to solve

normalizedTverskySimilarity

public static ArrayList<SimilarDomainCase> normalizedTverskySimilarity(HashMap<Integer,Premise> premises,
                                                                       ArrayList<DomainCase> candidateCases)
Returns a list of the candidate domain-cases with a similarity degree to the given domain-cases. The similarity is calculated using normalized Tversky distance among the premises.

Parameters:
premises - HashMap of Premise to calculate the similarity with the candidate domain-cases
candidateCases - The domain-cases that can be similar to the domain-case to solve
Returns:
A SimilarDomainCase ArrayList with the candidate domain-cases and its similarity degree to the domain-case to solve


Copyright © 2012 GTI-IA. All Rights Reserved.