|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.dataAnalysis.DataAcquirer
public class DataAcquirer
DataAcquirer allows the performance of various statistical operations on a dataset. Quantities that may be calculated include mean, median, variance, standard deviation, Pearson's R. Information may also be extracted from a results file or from a Population object, including average tree length, number of times a Function or Input is used, etc.
Nested Class Summary | |
---|---|
static class |
DataAcquirer.ScalarData
ScalarData refer to scalar properties of an Individual. |
static class |
DataAcquirer.VectorData
VectorData refer to the balance of components within each individual. |
Constructor Summary | |
---|---|
DataAcquirer(Population population)
Constructor takes a Population object as an argument, allowing the extraction of information from a particular Population. |
Method Summary | |
---|---|
static int |
getBestProgramLengthFromFile(java.lang.String filename,
java.lang.String operatorString,
boolean maximiseFitness)
This method returns the length of the best Individual within a Population, as represented within a results file. |
Component[] |
getComponents()
Returns the Components available to members of the Population |
Constant[] |
getConstants()
Returns the Constants available to members of the Population |
static double |
getCorrelation(double[][] data)
Returns the correlation coefficient (R^2) for 2 variables. |
static double[] |
getDiversitiesFromFile(java.lang.String filename)
This method returns the tree diversity and the fitness diversity for a population. |
static java.util.Hashtable<java.lang.String,java.lang.Double> |
getFractionalInputUseFromFile(java.lang.String filename)
Returns the Input use within a population, as represented in a results file. |
Function[] |
getFunctions()
Returns the Functions available to members of the Population |
static java.util.Hashtable<java.lang.String,java.lang.Double> |
getFunctionUseFromFile(java.lang.String filename)
Returns the Function use within a population, as represented in a results file. |
Input[] |
getInputs()
Returns the Inputs available to members of the Population |
static java.util.Hashtable<java.lang.String,java.lang.Double> |
getInputUseFromFile(java.lang.String filename)
Returns the Input use within a population, as represented in a results file. |
static double |
getMean(double[] data)
Returns the mean value of a set of data. |
static double |
getMedian(double[] data)
Returns the median value of a set of data. |
static double[] |
getMinMax(double[] data)
Returns the minimum and maximum values of a dataset. |
static double[] |
getPoissonDistribution(double lambda,
int min,
int max)
Returns a Poisson distribution as a set of probabilities of values between min and max. |
static int[] |
getProgramLengthsFromFile(java.lang.String filename,
java.lang.String operatorString)
This method returns the lengths of all Individuals within a Population, as represented within a results file. |
double[] |
getScalarData(DataAcquirer.ScalarData dataType)
Returns the required ScalarData for all Individuals within the Population |
double[][] |
getScalarData(DataAcquirer.ScalarData[] dataType,
int orderByIndex)
Returns the required ScalarData for all Individuals within the Population. |
static double |
getStandardDeviation(double[] data)
Returns the standard deviation of a set of data. |
static java.util.Hashtable<java.lang.String,java.lang.Integer> |
getTerminalSubtreesFromFile(java.lang.String filename)
Returns the terminal subtree use within a population, as represented in a results file. |
static double |
getVariance(double[] data)
Returns the variance of a set of data. |
double[][] |
getVectorData(DataAcquirer.VectorData dataType)
This method returns data for the Individuals in the same order as in the population. |
double[][] |
getVectorData(DataAcquirer.VectorData dataType,
DataAcquirer.ScalarData sortBy)
Returns the requested VectorData for all Individuals within the Population. |
static java.lang.Object[] |
partitionData(double[] data,
double width)
This method partitions the data into equal sized partitions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataAcquirer(Population population)
Method Detail |
---|
public static double[] getMinMax(double[] data)
public static java.lang.Object[] partitionData(double[] data, double width)
public static double getMean(double[] data)
public static double getMedian(double[] data)
public static double getVariance(double[] data)
public static double getStandardDeviation(double[] data)
public static java.util.Hashtable<java.lang.String,java.lang.Double> getInputUseFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.util.Hashtable<java.lang.String,java.lang.Double> getFractionalInputUseFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.util.Hashtable<java.lang.String,java.lang.Integer> getTerminalSubtreesFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static java.util.Hashtable<java.lang.String,java.lang.Double> getFunctionUseFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static int[] getProgramLengthsFromFile(java.lang.String filename, java.lang.String operatorString) throws java.io.IOException
java.io.IOException
public static int getBestProgramLengthFromFile(java.lang.String filename, java.lang.String operatorString, boolean maximiseFitness) throws java.io.IOException
java.io.IOException
public static double[] getDiversitiesFromFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public static double getCorrelation(double[][] data)
public double[] getScalarData(DataAcquirer.ScalarData dataType)
public double[][] getScalarData(DataAcquirer.ScalarData[] dataType, int orderByIndex)
public Function[] getFunctions()
public Input[] getInputs()
public Constant[] getConstants()
public Component[] getComponents()
public double[][] getVectorData(DataAcquirer.VectorData dataType, DataAcquirer.ScalarData sortBy)
public double[][] getVectorData(DataAcquirer.VectorData dataType)
getVectorData(VectorData, ScalarData)
public static double[] getPoissonDistribution(double lambda, int min, int max)
lambda
- The expected value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |