|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectclassifier.gp.MutationPlain
Implementation of the classical mutation operator
| Field Summary | |
(package private) Condition |
is_function
|
(package private) Condition |
is_program
|
protected int |
max_depth
|
protected int |
mut_depth
|
protected GProgram[] |
program
|
(package private) GProgram |
program_old
|
| Constructor Summary | |
MutationPlain(int method_generation,
double internal,
int max_depth)
Inizialize the parameters of the mutation |
|
| Method Summary | |
double |
getInternalRate()
Probability that a internal node is chosen as a mutation point |
int |
getMaxDepth()
Maximum allowable depth of the resulting tree |
int |
getMethodOfGeneration()
|
void |
setInternalRate(double internal)
To change the probability that a internal node is chosen as a mutation point |
void |
setMaxDetph(int max)
To change the maximum allowable depth of a tree |
void |
setMethodOfGeneration(int method)
|
GProgram[] |
start(GProgram[] gprogram,
FunctionSet functionset,
TerminalSet terminalset)
Method to start the mutation operation |
(package private) void |
validateMutation(GProgram[] program)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected GProgram[] program
GProgram program_old
protected int max_depth
protected int mut_depth
Condition is_function
Condition is_program
| Constructor Detail |
public MutationPlain(int method_generation,
double internal,
int max_depth)
method_generation - 1=FULL 2=GROW 3=RAMPED HALF AND HALF as you can see in MethodOfGeneration classinternal - Probability [0..1] that a internal node is chosen as a mutation point, it should kept lowmax_depth - Maximum allowable depth of the resulting tree| Method Detail |
public int getMaxDepth()
public double getInternalRate()
public void setMaxDetph(int max)
max - new integer value of the maximum depthpublic void setInternalRate(double internal)
internal - a double value in the range of [0..1]public int getMethodOfGeneration()
public void setMethodOfGeneration(int method)
public GProgram[] start(GProgram[] gprogram,
FunctionSet functionset,
TerminalSet terminalset)
MutationOperator
start in interface MutationOperatorgprogram - an array that contain the GProgram to be mutatedfunctionset - an object that contain the function set from what to generate the new mutate programterminalset - an object that contain the terminal set from what to generate the new mutate program
void validateMutation(GProgram[] program)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||