|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.Utils
public final class Utils
Utils contains a number of static methods of use to various members of the gp package.
Constructor Summary | |
---|---|
Utils()
|
Method Summary | |
---|---|
static java.awt.geom.Point2D.Double[] |
getAllROCCoordinates(double[] outputs,
double[] targetOutputs)
This method is used in calculating AUROC values. |
static double |
getAUROC(double[] outputs,
double[] targetOutputs)
Calculates and returns the Area under the ROC curve (AUROC) during a classification task, using all of the provided data. |
static int |
getDepth(java.util.Vector<Component> nodes,
int index)
This method returns the depth of the node represented by index |
static double |
getDistance(Individual ind1,
Individual ind2)
This method returns the genotypic distance between 2 Individuals. |
static double |
getDistance(java.util.Vector<Component> nodes1,
java.util.Vector<Component> nodes2)
This method returns the genotypic distance between 2 component lists. |
static int |
getEndOfFragment(java.util.Vector<Component> nodes,
int startIndex)
This method calculates the index of the last node within a subtree. |
static int[] |
getFragmentDepths(java.util.Vector<Component> nodes,
int startIndex,
int finishIndex)
This method calulates the minimum and maximum depths occurring between 2 nodes (those represented by startIndex and endIndex). |
static int[] |
getIndicesProbabilistically(int[] initialIndices,
boolean favourFirst)
This method takes a vector of indices that are assumed to be ordered. |
static int[] |
getIndicesProbabilistically(java.util.Vector<java.lang.Integer> initialIndices,
boolean favourFirst)
This method takes a vector of indices that are assumed to be ordered. |
static java.util.Hashtable<java.lang.Integer,java.lang.Double>[] |
getNumberedInputs(java.util.Hashtable<java.lang.String,java.lang.Double>[] inputs,
java.lang.String[] names)
|
static java.lang.String[] |
getOutputClasses(java.lang.String[] targetOutputs)
Returns the unique classes avaialable from a list of class memberships, sorted into ascending (alphabetical) order. |
static int[] |
getRandomIndices(int length)
Returns the integers between 1 and length (inclusive) in random order. |
static int[] |
getRandomIndices(int length,
int numberOfIndices)
Returns an array containing numberOfIndices. |
static int[] |
ShellSortStrings(java.lang.String[] values)
Sorts values using the Shell sort algorithm, in alphabetical order. |
static int[] |
ShellSortValues(double[] values)
Sorts values using the Shell sort algorithm, returning them in ascending order. |
static int[] |
ShellSortValues(double[] values,
boolean sortAscending)
Sorts values using the Shell sort algorithm. |
static double[][] |
stringToNumericTargets(java.lang.String[] stringTargets,
java.lang.String[] targetClasses)
Converts String representations of class membership into numeric values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utils()
Method Detail |
---|
public static double[][] stringToNumericTargets(java.lang.String[] stringTargets, java.lang.String[] targetClasses)
public static int getEndOfFragment(java.util.Vector<Component> nodes, int startIndex)
public static int[] getFragmentDepths(java.util.Vector<Component> nodes, int startIndex, int finishIndex)
public static int getDepth(java.util.Vector<Component> nodes, int index)
public static int[] getRandomIndices(int length, int numberOfIndices)
public static int[] getRandomIndices(int length)
public static int[] ShellSortValues(double[] values, boolean sortAscending)
public static int[] ShellSortStrings(java.lang.String[] values)
public static int[] ShellSortValues(double[] values)
public static int[] getIndicesProbabilistically(java.util.Vector<java.lang.Integer> initialIndices, boolean favourFirst)
public static int[] getIndicesProbabilistically(int[] initialIndices, boolean favourFirst)
public static java.lang.String[] getOutputClasses(java.lang.String[] targetOutputs)
public static double getDistance(Individual ind1, Individual ind2)
public static double getDistance(java.util.Vector<Component> nodes1, java.util.Vector<Component> nodes2)
public static java.util.Hashtable<java.lang.Integer,java.lang.Double>[] getNumberedInputs(java.util.Hashtable<java.lang.String,java.lang.Double>[] inputs, java.lang.String[] names)
public static double getAUROC(double[] outputs, double[] targetOutputs) throws InvalidInputSizeException
InvalidInputSizeException
public static java.awt.geom.Point2D.Double[] getAllROCCoordinates(double[] outputs, double[] targetOutputs) throws InvalidInputSizeException
InvalidInputSizeException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |