test
Class TestExSimNum

java.lang.Object
  extended bytest.TestBase
      extended bytest.TestExSimNum

public class TestExSimNum
extends TestBase

Class TestExSimNum runs Test 4b on pre-seeding on external similiarity matrix on simple graph (each parameter setting is tested with 100 runs). Fixed: maxLoop = 3000, L = 0.01 Graph type = simple asymmetric graph (unlabeled, undirected, unweighted) Concept number = 20 Relation fullness = 50% Seed Mode = rand Varying: Seed Num = 0, 1, 2, 3, 4 Noise level = 0, 2%, 4%, 6%, 8% Note: All seeded concept pairs are correct mappings; Seeding mode refers to whether to choose none concept, a random concept, a concept with maximum or minimum degree to pre-map. Seeding number refers to how many pairs of concepts are being seeded.


Field Summary
static boolean debugAll
          If the derived class sets this to true, absurdist.print() will be triggered, printing both systems etc
static boolean debugMode
           
(package private) static java.text.DecimalFormat dfa
           
(package private)  double fullness
           
(package private)  int n
          Local copies of important variables.
(package private)  double noise
           
static int NRuns
           
(package private)  java.io.PrintStream out
           
static java.lang.String recover
          Optional: name of the old results file (from an earlier interrupted run) to recover.
(package private)  int snum
           
(package private)  ConceptSystem systemN
           
(package private)  ConceptSystem systemO
           
 
Constructor Summary
TestExSimNum()
           
 
Method Summary
static void debug(java.lang.String s)
           
static void debugln(java.lang.String s)
           
static void error(java.lang.String s)
           
(package private)  ConceptSystem getSysN(ConceptSystem systemO)
          Creates the noisy system.
(package private)  ConceptSystem getSysO()
          Creates the base system.
static void main(java.lang.String[] args)
           
(package private)  void mainCall(java.lang.String[] args)
           
(package private)  void mainLoop(int n, double fullness, double noise, int NRuns, java.io.PrintStream out)
          Create a system with a specified number of nodes and "relation fulness", and its noisy copy with a specified noise level; match them; repeat NRuns times.
(package private) static void printStats(int n, double fullness, double noise, int NRuns, Absurdist.Results avg, java.io.PrintStream out)
           
(package private)  int recoverOldFile(Absurdist.Results avg, int NRuns, java.io.PrintStream out)
          Reads data saved to a file during an earlier incomplete run, and adds them to the results accumulator
(package private)  void seedExSim(Absurdist absurdist)
          Fills the external similarity matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snum

int snum

debugMode

public static boolean debugMode

debugAll

public static boolean debugAll
If the derived class sets this to true, absurdist.print() will be triggered, printing both systems etc


NRuns

public static int NRuns

recover

public static java.lang.String recover
Optional: name of the old results file (from an earlier interrupted run) to recover.


dfa

static java.text.DecimalFormat dfa

n

int n
Local copies of important variables. They are maintained as instance members so that getSysO(), getSysN() etc. could access them .


fullness

double fullness

noise

double noise

systemO

ConceptSystem systemO

systemN

ConceptSystem systemN

out

java.io.PrintStream out
Constructor Detail

TestExSimNum

public TestExSimNum()
Method Detail

seedExSim

void seedExSim(Absurdist absurdist)
Fills the external similarity matrix. By default, it is filled with all zeros, but derived classes implementing experiments with external similarity may set some non-zero values.

Overrides:
seedExSim in class TestBase

main

public static void main(java.lang.String[] args)

mainCall

void mainCall(java.lang.String[] args)

debug

public static void debug(java.lang.String s)

debugln

public static void debugln(java.lang.String s)

error

public static void error(java.lang.String s)

getSysO

ConceptSystem getSysO()
                throws java.lang.Exception
Creates the base system. Derived classes may redefine this method according to how they need to create it.

Throws:
java.lang.Exception

getSysN

ConceptSystem getSysN(ConceptSystem systemO)
                throws java.lang.Exception
Creates the noisy system. Derived classes may redefine this method according to how they need to create it.

Throws:
java.lang.Exception

recoverOldFile

int recoverOldFile(Absurdist.Results avg,
                   int NRuns,
                   java.io.PrintStream out)
             throws java.io.IOException
Reads data saved to a file during an earlier incomplete run, and adds them to the results accumulator

Parameters:
avg - The results accumulator array to add recovered data to
out - The new results file
Returns:
number of runs recovered
Throws:
java.io.IOException

mainLoop

void mainLoop(int n,
              double fullness,
              double noise,
              int NRuns,
              java.io.PrintStream out)
        throws java.lang.Exception
Create a system with a specified number of nodes and "relation fulness", and its noisy copy with a specified noise level; match them; repeat NRuns times.

Throws:
java.lang.Exception

printStats

static void printStats(int n,
                       double fullness,
                       double noise,
                       int NRuns,
                       Absurdist.Results avg,
                       java.io.PrintStream out)