I
- IIndividual's type.public abstract class ProblemEvaluator<I extends IIndividual> extends <any> implements IProblem
Abstract implementation of an individuals evaluator of a dataset problem
Modifier and Type | Field and Description |
---|---|
protected boolean |
dataNormalized
normalize data ?
|
protected Interval |
inputInterval
Normalization input interval
|
protected boolean |
logTransformation
Logarithm transformation
|
protected Normalizer |
normalizer
Normalizer used to normalizer the trainData
|
protected Interval |
outputInterval
Normalization input interval
|
protected DoubleTransposedDataSet |
scaledTestData
Scaled test DataSet with data to evaluate the individuals
|
protected DoubleTransposedDataSet |
scaledTrainData
Scaled train DataSet with data to evaluate the individuals
|
protected double[] |
unscaledMax
Auxiliary arrays
|
protected double[] |
unscaledMin
Auxiliary arrays
|
protected DoubleTransposedDataSet |
unscaledTestData
Unscaled test DataSet with data to evaluate the individuals
|
protected DoubleTransposedDataSet |
unscaledTrainData
Unscaled train DataSet with data to evaluate the individuals
|
Constructor and Description |
---|
ProblemEvaluator()
Empty constructor
|
Modifier and Type | Method and Description |
---|---|
void |
configure(Configuration settings)
Configuration parameters for NeuralNetEvaluator are:
train-data: complex
Train data set used in individuals evaluation. |
abstract void |
evaluate(I ind)
Evaluates a individual
|
Interval |
getInputInterval()
Returns the input interval of normalized data
|
Normalizer |
getNormalizer()
Returns the normalizer associated to the trainData DataSet
|
Interval |
getOutputInterval()
Returns the input interval of normalized data
|
DoubleTransposedDataSet |
getTestData()
Returns the test data associated to this evaluator
|
DoubleTransposedDataSet |
getTrainData()
Returns the train data associated to this evaluator
|
double[] |
getUnscaledMax()
Returns the array of maximum values in datasets
|
double[] |
getUnscaledMin()
Returns the array of minimum values in datasets
|
DoubleTransposedDataSet |
getUnscaledTestData()
Returns the DataSet associated to the evaluator as unscaled test data
|
DoubleTransposedDataSet |
getUnscaledTrainData()
Returns the DataSet associated to the evaluator as unscaled train data
|
boolean |
isDataNormalized()
Returns a boolean value indicating if the DataSets are going to be normalized
|
boolean |
isLogTransformation()
Returns a boolean value indicating if the DataSets are going to be log
transformated
|
void |
readData()
Read and normalize evaluator datasets
|
void |
readData(byte[] schema,
IDataset traindata,
IDataset testdata)
Read and normalize evaluator datasets
|
void |
setDataNormalized(boolean normalizeData)
Sets a boolean value indicating if the DataSets are going to be normalized
|
void |
setInputInterval(Interval inputInterval)
Sets the input interval of normalized data
|
void |
setLogTransformation(boolean logTransformation)
Sets a boolean value indicating if the DataSets are going to be log
transformated
|
void |
setNormalizer(Normalizer normalizer)
Sets the normalizer associated to the trainData DataSet
|
void |
setOutputInterval(Interval outputRange)
Sets the output range of normalized data
|
void |
setUnscaledTestData(DoubleTransposedDataSet unscaledTestData)
Sets the DataSet associated to the evaluator as unscaled test data
|
void |
setUnscaledTrainData(DoubleTransposedDataSet unscaledTrainData)
Sets the DataSet associated to the evaluator as unscaled train data
|
protected DoubleTransposedDataSet unscaledTrainData
protected DoubleTransposedDataSet scaledTrainData
protected DoubleTransposedDataSet unscaledTestData
protected DoubleTransposedDataSet scaledTestData
protected boolean dataNormalized
protected Normalizer normalizer
protected Interval inputInterval
protected Interval outputInterval
protected boolean logTransformation
protected double[] unscaledMin
protected double[] unscaledMax
public DoubleTransposedDataSet getTrainData()
Returns the train data associated to this evaluator
getTrainData
in interface IProblem
public DoubleTransposedDataSet getTestData()
Returns the test data associated to this evaluator
getTestData
in interface IProblem
public boolean isDataNormalized()
Returns a boolean value indicating if the DataSets are going to be normalized
isDataNormalized
in interface IProblem
public void setDataNormalized(boolean normalizeData)
Sets a boolean value indicating if the DataSets are going to be normalized
normalizeData
- Boolean DataSets going to be normalizedpublic boolean isLogTransformation()
Returns a boolean value indicating if the DataSets are going to be log transformated
isLogTransformation
in interface IProblem
public void setLogTransformation(boolean logTransformation)
Sets a boolean value indicating if the DataSets are going to be log transformated
logTransformation
- Boolean DataSets going to be transformatedpublic Normalizer getNormalizer()
Returns the normalizer associated to the trainData DataSet
public void setNormalizer(Normalizer normalizer)
Sets the normalizer associated to the trainData DataSet
normalizer
- New Normalizer to be usedpublic DoubleTransposedDataSet getUnscaledTestData()
Returns the DataSet associated to the evaluator as unscaled test data
public void setUnscaledTestData(DoubleTransposedDataSet unscaledTestData)
Sets the DataSet associated to the evaluator as unscaled test data
unscaledTestData
- New Dataset to be usedpublic DoubleTransposedDataSet getUnscaledTrainData()
Returns the DataSet associated to the evaluator as unscaled train data
public void setUnscaledTrainData(DoubleTransposedDataSet unscaledTrainData)
Sets the DataSet associated to the evaluator as unscaled train data
unscaledTrainData
- New Dataset to be usedpublic Interval getInputInterval()
Returns the input interval of normalized data
getInputInterval
in interface IProblem
public void setInputInterval(Interval inputInterval)
Sets the input interval of normalized data
inputInterval
- New input interval rangepublic Interval getOutputInterval()
Returns the input interval of normalized data
getOutputInterval
in interface IProblem
public void setOutputInterval(Interval outputRange)
Sets the output range of normalized data
outputRange
- New output normalization rangepublic double[] getUnscaledMin()
Returns the array of minimum values in datasets
public double[] getUnscaledMax()
Returns the array of maximum values in datasets
public void configure(Configuration settings)
Configuration parameters for NeuralNetEvaluator are:
train-data: complex
Train data set used in individuals evaluation.
train-data[@file-name] String
File name of train data
test-data: complex
Test data set used in individuals evaluation.
test-data[@file-name] String
File name of test data
[@normalize-data]: boolean (default = false)
If this parameter is set to true
data sets values are
normalizated after reading their contents
[input-interval] (complex)
Input interval of normalization.
[output-interval] (complex)
Output interval of normalization.
settings
- Configuration object from which the properties are readpublic void readData() throws java.io.IOException, java.lang.NumberFormatException
Read and normalize evaluator datasets
java.io.IOException
- Data not correctjava.lang.NumberFormatException
- Format of data not correctpublic void readData(byte[] schema, IDataset traindata, IDataset testdata)
Read and normalize evaluator datasets
schema
- Schema of the datasettraindata
- IDataset with the training datatestdata
- IDataset with the test datapublic abstract void evaluate(I ind)
ind
- individual to be evaluated