|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.pcl.absurdist.absurdist.Absurdist
Class Absurdist provides the ABSURDIST II graph matching algorithms to compute the correspondence between two concept systems, and finds the optimal mappings between them. The behavior of this class is affected by a number of parameters, which can be supplied as Java System Properties on the command line (java -Dname=value ...). For example, running java -DresetL=false -DL=0.01 -DmaxLoop=5000 driver.ApplicDriver will run the program with fixed L equal to 0.01, interrupting the loop at the 5000-th iteration, if the convergence has not been achieved. java -DresetL=true driver.ApplicDriver will adjust the learning rate at every step to 1/2 of the maximum safe rate. This is supposed to achieve fastest convergence. One can find all the parameters in the code by searching for 'prop.getOption'.
| Nested Class Summary | |
static class |
Absurdist.Results
Used for reporting. |
| Field Summary | |
static boolean |
adjBest
If true, we'll find the optimal permutation (this may be very expensive!) |
double |
alpha
Coefficients for external similarity. |
static double |
alphaShare
This flag determines the alpha/(alpha+beta) ratio to be used in adjustCoeff(); it only is used if useAlphaShare is true, and is ignored otherwise. |
double |
beta
Coefficients for activation. |
double |
chi
Coefficients for inhibition. |
static double |
cInit
Intitial value for correspondence matrix. |
static int |
coefMode
This parameter controls how chi and beta are initially set, and whether they are reset during the iterative process. |
static int |
CONVERGED
Concept systems mapping iteration converged. |
double[][][] |
correspond
Correspondence matrix C[step][row][col]. |
static int |
CREATED
Concept system created. |
static double |
cvgThresh
Threshold for iteration convergence. |
static int |
dampingMode
Damping mode. |
static boolean |
enforce1to1map
If true, 1-1 mapping will be enforced. |
double[][] |
exSim
External similarity E[row][col]. |
double[][][] |
inhib
Inhibitor I[step][row][col]. |
static int |
INITIAL
Initial status without concept system created. |
double[][][] |
inSim
Internal similarity, also called activator, R[step][row][col]. |
static int |
intLoop
Sampling interval for plots. |
static int |
ITERATING
Concept systems in mapping iteration. |
static double |
lRate
Learning rate (this may be adjusted if resetL=true). |
int[] |
mapNO
Mappings from systemN to systemO, recording indices of matched concepts. |
int[] |
mapON
Mappings from systemO to systemN, recording indices of matched concepts. |
static int |
MAPPED
Concept systems mapping completed. |
static double |
mapThresh
Threshold for valid mapping. |
static double |
maxL
The ceiling for adjustable learning rate. |
static int |
maxLoop
Maximum number of iterations. |
double[][][] |
netIn
Network input N[step][row][col]. |
int |
nStep
Actual number of steps being recorded during network iteration. |
static ParseConfig |
prop
An empty property list -- just an interface to system properties |
static boolean |
resetL
If true, we recompute the learning rate at each step, for fastest convergence. |
Absurdist.Results |
results
|
int |
status
Status of the system. |
ConceptSystem |
systemN
Target system for mapping. |
ConceptSystem |
systemO
Source system for mapping. |
boolean |
systemsAreSimple
This will be set to true in the constructor if both concept systems being matched are "binary", that is have no other relationship weights than 1 and 0. |
boolean |
useAlphaShare
If true, the alphaShare parameter is used to set alpha via beta. |
boolean |
useAnchors
If true, use anchors overlap for external similarity |
static boolean |
useExponential
If true, use the exponential version of activator and inhibitor to compute netwoek input. |
static boolean |
useFastGeneral
If true, use the "fast" (N^2 D^2) method for general (labeled, weighted) graphs. |
| Constructor Summary | |
Absurdist()
Creates an empty absurdist system. |
|
Absurdist(ConceptSystem systemO,
ConceptSystem systemN)
Creates an absurdist system containing the source and target concept systems and random external similarities. |
|
| Method Summary | |
double |
calcLinkSim(Link lo,
Link ln)
Computes the similarity between the two links. |
void |
evalMap()
Evaluates the quality of the mapping in mapON[]. |
void |
initExSim()
Initialize external similarity matrix to all 0's. |
boolean |
isConverged()
Returns true if the network iteration is converged; otherwise false. |
boolean |
isCreated()
Returns true if the two systems are already created; otherwise false. |
boolean |
isInitial()
Returns true if the two systems have not yet been created; otherwise false. |
boolean |
isIterating()
Returns true if the network iteration is going on; otherwise false. |
boolean |
isMapped()
Returns true if the two systems are already mapped; otherwise false. |
static Absurdist |
loadSystems(java.lang.String fileName,
int w,
int h)
Creates a new instance of Absurdist initialized with the 2 systems read from a file containing Java serialized objects. |
void |
mapSystem()
Maps orginal concept system to the one with added noise, using exponenital/linear activator/inhibitor. |
void |
print()
Prints the source and target concept systems, the correspondence matrix, and the final mappings. |
void |
printCorrespond()
Prints the correspondence matrix to the standard output. |
void |
printExSim()
Prints the external similarity matrix to the standard output. |
void |
printMap()
Prints the mapping between systemO and systemN to the standard output. |
void |
printSystems()
Prints the two systems to the standard output. |
void |
readjustChi(double[][] exSim,
double[][] inSim,
double[][] inhib)
A normalization method that takes both exSim and inSim into account. |
void |
saveSystems(java.lang.String fileName)
Writes out the concept systems as Java serialized objects intoa file. |
void |
setSystemN(ConceptSystem systemN)
Sets the target concepts system to be mapped to. |
void |
setSystemO(ConceptSystem systemO)
Sets the source concepts system to be mapped from. |
void |
setSystems(ConceptSystem systemO,
ConceptSystem systemN)
Sets the two concepts systems for mapping. |
double |
sumElem(double[][] a)
Computes the sum of the elements in an array. |
static void |
turnOffHistory()
Turn off the iteration history recording so that less memory will be used. |
void |
writeCorrespond(java.lang.String filename)
Writes the correspondence matrix to a text file. |
void |
writeMap(java.lang.String filename)
Writes the mapping between systemO and systemN to a text file. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static ParseConfig prop
public static final int INITIAL
public static final int CREATED
public static final int ITERATING
public static final int CONVERGED
public static final int MAPPED
public static double cInit
public static double lRate
public static int maxLoop
public static int intLoop
public static double cvgThresh
public static double mapThresh
public static int coefMode
public static boolean resetL
public static double maxL
public static int dampingMode
public static boolean useFastGeneral
public static boolean useExponential
public static boolean enforce1to1map
public static boolean adjBest
public boolean systemsAreSimple
public boolean useAnchors
public boolean useAlphaShare
public static double alphaShare
#adjustCoeffpublic double alpha
public double beta
public double chi
public ConceptSystem systemO
public ConceptSystem systemN
public int nStep
public int status
public double[][] exSim
public double[][][] inSim
public double[][][] inhib
public double[][][] netIn
public double[][][] correspond
public int[] mapON
public int[] mapNO
public Absurdist.Results results
| Constructor Detail |
public Absurdist()
public Absurdist(ConceptSystem systemO,
ConceptSystem systemN)
| Method Detail |
public void setSystemO(ConceptSystem systemO)
public void setSystemN(ConceptSystem systemN)
public void setSystems(ConceptSystem systemO,
ConceptSystem systemN)
public void initExSim()
public static void turnOffHistory()
public double calcLinkSim(Link lo,
Link ln)
public void readjustChi(double[][] exSim,
double[][] inSim,
double[][] inhib)
public double sumElem(double[][] a)
public void evalMap()
Note: mismapped concepts and relations only apply to mappings between a concept system and its noisy copy, assuming that the noise is small enough so that the mapping should be identity, i.e. Ci -> Ci'.
public void mapSystem()
public boolean isInitial()
public boolean isCreated()
public boolean isIterating()
public boolean isConverged()
public boolean isMapped()
public void writeCorrespond(java.lang.String filename)
throws java.lang.Exception
java.lang.Exception
public void writeMap(java.lang.String filename)
throws java.lang.Exception
java.lang.Exceptionpublic void printSystems()
public void printExSim()
public void printCorrespond()
public void printMap()
public void print()
throws java.lang.Exception
java.lang.Exception
public static Absurdist loadSystems(java.lang.String fileName,
int w,
int h)
w - Width of the display area for the graphs.h - Height of the display area for the graphs.public void saveSystems(java.lang.String fileName)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||