|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jaga.experiment.ExperimentLib
Provides common functionality used by many Experiment imlementations.
Constructor Summary | |
ExperimentLib()
|
Method Summary | |
static SampleData[] |
bitsToSampleDatas(int[][] bits,
int dataLength)
Generates an array of SampleDatas from the positions of 1s and their lengths |
static SampleData[] |
generateCompleteShuffledTest(int nrInputs)
|
static SampleData[] |
generateCompleteShuffledTest(int nrInputs,
long seed)
|
static SampleData[] |
generateCompleteTest(int nrInputs)
|
static SampleData[] |
generateCompleteTest(int nrInputs,
int sampleSeparation)
Not sure why allow to change inputSampleSep - to use as pattern directly |
static SampleData[] |
generateInputFromTest(BitSet[] fixedTestBits,
double fixedTestProportion,
int inputDataLength,
int inputSampleSeparation)
given a set of fixed tests we wish to send as inputs to an individual it generates the inputs of the desired length by repeating these tests and then filling the rest with random inputs. |
static double |
getCorrelationFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
BitSet desQ,
BitSet actQ)
|
static double |
getCorrelationFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
BitSet desQ,
BitSet actQ,
int ignoredTests)
Wrapper version for BitSets |
static double |
getCorrelationFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
double[] desQ,
double[] actQ)
Wrapper for getCorrelationFitness with default ignoredTests = 0 |
static double |
getCorrelationFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
double[] desQ,
double[] actQ,
int ignoredTests)
Given what the output should have been and what it was returns fitness value based on their correlation. |
static double |
getCorrelationFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
int[] desQ,
int[] actQ)
Wrapper version for arrays of ints |
static double |
getSimpleCorrFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
BitSet desQ,
BitSet Q)
Simplification of correlation function for boolean series. |
static double |
getSumFitness(double tsetup,
int inputSamples,
int inputSampleSeparation,
BitSet Q,
BitSet desQ)
|
static void |
setRandomSeed(long seed)
|
static BitSet[] |
shuffleTest(BitSet[] test)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExperimentLib()
Method Detail |
public static void setRandomSeed(long seed)
public static double getSimpleCorrFitness(double tsetup, int inputSamples, int inputSampleSeparation, BitSet desQ, BitSet Q)
public static double getSumFitness(double tsetup, int inputSamples, int inputSampleSeparation, BitSet Q, BitSet desQ)
public static double getCorrelationFitness(double tsetup, int inputSamples, int inputSampleSeparation, double[] desQ, double[] actQ)
public static double getCorrelationFitness(double tsetup, int inputSamples, int inputSampleSeparation, double[] desQ, double[] actQ, int ignoredTests)
tsetup
- setup time allowed for output to stabilize.inputSamples
- how many input samples there were.inputSampleSeparation
- how often the input changed, counted in output samples. Note outputSamples = inputSamples * inputSampleSeparation.desQ
- the desired (perfect) output.actQ
- the actual output whose fitness we want to evaluate.ignoredTests
- number of tests of length inputSampleSeparation which will be ignored from the beginning.public static double getCorrelationFitness(double tsetup, int inputSamples, int inputSampleSeparation, BitSet desQ, BitSet actQ)
public static double getCorrelationFitness(double tsetup, int inputSamples, int inputSampleSeparation, BitSet desQ, BitSet actQ, int ignoredTests)
public static double getCorrelationFitness(double tsetup, int inputSamples, int inputSampleSeparation, int[] desQ, int[] actQ)
public static SampleData[] bitsToSampleDatas(int[][] bits, int dataLength)
public static SampleData[] generateCompleteTest(int nrInputs)
public static SampleData[] generateCompleteTest(int nrInputs, int sampleSeparation)
public static SampleData[] generateCompleteShuffledTest(int nrInputs, long seed)
public static SampleData[] generateCompleteShuffledTest(int nrInputs)
public static BitSet[] shuffleTest(BitSet[] test)
public static SampleData[] generateInputFromTest(BitSet[] fixedTestBits, double fixedTestProportion, int inputDataLength, int inputSampleSeparation)
fixedTestBits
- array of BitSets holding test datafixedTestProportion
- double varying from 0 to 1 indicating what proportion of input samples to fill in with the fixed test. 0=>all random, 1=>as many fixed tests as fitinputDataLength
- how many inputs to generateinputSampleSeparation
- what sample separation to create the inputs with
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |