test
Class TestNoiseSizeDgr

java.lang.Object
  extended bytest.TestBase
      extended bytest.TestNoiseSizeDgr

public class TestNoiseSizeDgr
extends TestBase

Class TestNoiseSizeDgr runs Test 1c on noise tolerance vs graph size (each parameter setting is tested with 100 runs). Fixed: Graph type = simple asymmetric graph (unlabeled, undirected, unweighted) maxLoop = 3000, L = 0.01 Average relation degree = 5 Varying: Concept number = 8, 10, 12, 15, 20 Noise level = 0, 2%, 4%, 6%, 8%


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)  ConceptSystem systemN
           
(package private)  ConceptSystem systemO
           
 
Constructor Summary
TestNoiseSizeDgr()
           
 
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 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 and sets alpha.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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

TestNoiseSizeDgr

public TestNoiseSizeDgr()
Method Detail

main

public static void main(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

seedExSim

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


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)