|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Problem
ec.gp.GPProblem
ec.app.sequence.SequenceClassificationProblem
public class SequenceClassificationProblem
Basic Fitness assessment code. This is meant to be generic for any sequence classification problem. What we do is read the parameters for data file that has positive and negative sequences. Format of file should be SEQUENCE \t label like ACTTGGCTTGTTGGTTAAGGTTATG.........TAGA 1 ACGTTGGTTGAAGGTTAAGGTTATG.........GAGA -1 etc It uses the basic fitness function as TruePositiveRatio * Math.abs(InformationGain )as fitness. TruePosiiveRatio ~ to Precision value and InformationGain as Discrimination factor. KozaFitness is about mimimization, so we do 1/1+fitness to get the koza fitness.
Field Summary | |
---|---|
static double |
MEDIUM
|
static java.lang.String |
POSITIVE_FILE_NAME_PARAM
|
static double |
SMALL
The small deviation allowed in double comparisons. |
Fields inherited from class ec.gp.GPProblem |
---|
data, P_DATA, P_GPPROBLEM, P_STACK, stack |
Fields inherited from class ec.Problem |
---|
P_PROBLEM |
Constructor Summary | |
---|---|
SequenceClassificationProblem()
|
Method Summary | |
---|---|
static double |
entropyConditionedOnColumns(double[][] matrix)
Computes conditional entropy of the rows given the columns. |
static double |
entropyConditionedOnRows(double[][] matrix)
Computes conditional entropy of the columns given the rows. |
static boolean |
eq(double a,
double b)
Tests if a is equal to b. |
void |
evaluate(ec.EvolutionState state,
ec.Individual ind,
int subpopulation,
int threadnum)
Evaluates the individual in ind, if necessary (perhaps not evaluating them if their evaluated flags are true), and sets their fitness appropriately. |
org.biojava.bio.symbol.SymbolList |
getCurrentSequence()
|
org.biojava.utils.regex.PatternFactory |
getFactory(int thread)
|
void |
setup(ec.EvolutionState state,
ec.util.Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
Methods inherited from class ec.gp.GPProblem |
---|
clone, defaultBase |
Methods inherited from class ec.Problem |
---|
canEvaluate, closeContacts, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ec.simple.SimpleProblemForm |
---|
describe |
Field Detail |
---|
public static double SMALL
public static double MEDIUM
public static final java.lang.String POSITIVE_FILE_NAME_PARAM
Constructor Detail |
---|
public SequenceClassificationProblem()
Method Detail |
---|
public org.biojava.utils.regex.PatternFactory getFactory(int thread)
public void setup(ec.EvolutionState state, ec.util.Parameter base)
ec.Prototype
For prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
setup
in interface ec.Prototype
setup
in interface ec.Setup
setup
in class ec.gp.GPProblem
public void evaluate(ec.EvolutionState state, ec.Individual ind, int subpopulation, int threadnum)
ec.simple.SimpleProblemForm
evaluate
in interface ec.simple.SimpleProblemForm
public static double entropyConditionedOnColumns(double[][] matrix)
matrix
- the contingency table
public static double entropyConditionedOnRows(double[][] matrix)
matrix
- the contingency table
public static boolean eq(double a, double b)
a
- a doubleb
- a doublepublic org.biojava.bio.symbol.SymbolList getCurrentSequence()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |