public class NeuralNetReporterClas
extends java.lang.Object
Generation reporter of neural net algorithms
Constructor and Description |
---|
NeuralNetReporterClas()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
void |
algorithmFinished(<any> event)
This event is fired when the algorithm has finished its execution.
|
void |
algorithmStarted(<any> event)
This event is fired when the algorithm has started its execution.
|
void |
doIterationReport(NeuralNetAlgorithm<NeuralNetIndividual> algorithm)
Outputs the information of an iteration to System.out
|
java.lang.String |
getBestModelResultFile()
Returns file name where the best model obtained will be written
|
java.lang.String |
getHeader()
Returns KEEL file header
|
IAttribute |
getOutputAttribute()
Returns output attribute metadata
|
java.lang.String |
getTestResultFile()
Returns file name where the testing results of best model
obtained will be written
|
java.lang.String |
getTrainResultFile()
Returns file name where the training results of best model
obtained will be written
|
void |
iterationCompleted(<any> event)
This event is fired when the algorithm has finished a generation.
|
void |
printGeneration(int nofgeneration,
<any> bestNnind,
<any> bestCCRNnind,
ParametricMutator<NeuralNetIndividual> parametricMutator,
IEvaluator evaluator)
Outputs the information of a generation to System.out
|
protected java.lang.String |
renderGeneration(int nofgeneration,
<any> bestNnind,
<any> bestCCRNnind,
ParametricMutator<NeuralNetIndividual> parametricMutator,
IEvaluator evaluator)
Renders a generation of the algorithm to a String
|
protected java.lang.String |
renderNeuralNetIndividual(<any> nnind,
IEvaluator evaluator)
Renders a NeuralNetIndividual to a String
|
void |
setBestModelResultFile(java.lang.String bestModelResultFile)
Sets file name where the best model obtained will be written
|
void |
setHeader(java.lang.String header)
Sets KEEL file header
|
void |
setOutputAttribute(IAttribute outputAttribute)
Sets output attribute metadata
|
void |
setTestResultFile(java.lang.String testResultFile)
Sets file name where the testing results of best model
obtained will be written
|
void |
setTrainResultFile(java.lang.String trainResultFile)
Sets file name where the testing results of best model
obtained will be written
|
public void algorithmStarted(<any> event)
This event is fired when the algorithm has started its execution.
event
- An event containing a reference to the source algorithm.
public void algorithmFinished(<any> event)
This event is fired when the algorithm has finished its execution.
event
- An event containing a reference to the source algorithm.
public void iterationCompleted(<any> event)
This event is fired when the algorithm has finished a generation.
event
- An event containing a reference to the source algorithm.
public java.lang.String getBestModelResultFile()
Returns file name where the best model obtained will be written
public void setBestModelResultFile(java.lang.String bestModelResultFile)
Sets file name where the best model obtained will be written
bestModelResultFile
- File name
public java.lang.String getTestResultFile()
Returns file name where the testing results of best model obtained will be written
public void setTestResultFile(java.lang.String testResultFile)
Sets file name where the testing results of best model obtained will be written
testResultFile
- File name
public java.lang.String getTrainResultFile()
Returns file name where the training results of best model obtained will be written
public void setTrainResultFile(java.lang.String trainResultFile)
Sets file name where the testing results of best model obtained will be written
trainResultFile
- File name
public java.lang.String getHeader()
Returns KEEL file header
public void setHeader(java.lang.String header)
Sets KEEL file header
header
- KEEL file header
public IAttribute getOutputAttribute()
Returns output attribute metadata
public void setOutputAttribute(IAttribute outputAttribute)
Sets output attribute metadata
outputAttribute
- New output attribute metadata
public void doIterationReport(NeuralNetAlgorithm<NeuralNetIndividual> algorithm)
Outputs the information of an iteration to System.out
algorithm
- Algorithm that is exectuting currently
public void printGeneration(int nofgeneration, <any> bestNnind, <any> bestCCRNnind, ParametricMutator<NeuralNetIndividual> parametricMutator, IEvaluator evaluator)
Outputs the information of a generation to System.out
nofgeneration
- Number of generation of the algorithmbestNnind
- Best NeuralNetIndividual of the algorithmbestCCRNnind
- Best CCR NeuralNetIndividual of the algorithm (if it is a Classification problem)parametricMutator
- ParametricMutator of the algorithmevaluator
- NeuralNetEvaluator to use in individual evaluation
protected java.lang.String renderGeneration(int nofgeneration, <any> bestNnind, <any> bestCCRNnind, ParametricMutator<NeuralNetIndividual> parametricMutator, IEvaluator evaluator)
Renders a generation of the algorithm to a String
nofgeneration
- Number of generation of the algorithmbestNnind
- Best NeuralNetIndividual of the algorithmbestCCRNnind
- Best CCR NeuralNetIndividual of the algorithm (if it is a Classification problem)parametricMutator
- ParametricMutator of the algorithmevaluator
- NeuralNetEvaluator to use in individual evaluationprotected java.lang.String renderNeuralNetIndividual(<any> nnind, IEvaluator evaluator)
Renders a NeuralNetIndividual to a String
nnind
- IGenotype(INeuralNet) to renderevaluator
- NeuralNetEvaluator to use in individual evaluation