Module es.upm.fi.cig.multictbnc
Class TestDatasetMethod
java.lang.Object
es.upm.fi.cig.multictbnc.performance.ValidationMethod
es.upm.fi.cig.multictbnc.performance.TestDatasetMethod
This class allows specifying different training and test datasets.
-
Constructor Summary
ConstructorDescriptionTestDatasetMethod
(DatasetReader testDatasetReader, boolean estimateProbabilities) Constructor that receives aDatasetReader
for the test dataset, whether the dataset should be shuffled, a seed for shuffling and whether the probabilities of each class configuration should be estimated during the testing.TestDatasetMethod
(DatasetReader trainingDatasetReader, DatasetReader testDatasetReader, boolean estimateProbabilities) Constructor that receives twoDatasetReader
for the training and test datasets, whether the test dataset should be shuffled, a seed for shuffling and whether the probabilities of each class configuration should be estimated during the testing. -
Method Summary
Modifier and TypeMethodDescriptionevaluate
(MultiCTBNC<?, ?> model) Evaluates the performance of the specified model and returns the results.evaluate
(MultiCTBNC<?, ?> model, double preprocessingExecutionTime) Evaluates the performance of the specified model and returns the results.Methods inherited from class es.upm.fi.cig.multictbnc.performance.ValidationMethod
displayModel, displayResults, setWriter
-
Constructor Details
-
TestDatasetMethod
public TestDatasetMethod(DatasetReader trainingDatasetReader, DatasetReader testDatasetReader, boolean estimateProbabilities) Constructor that receives twoDatasetReader
for the training and test datasets, whether the test dataset should be shuffled, a seed for shuffling and whether the probabilities of each class configuration should be estimated during the testing.- Parameters:
trainingDatasetReader
-DatasetReader
for the training datasettestDatasetReader
-DatasetReader
for the test datasetestimateProbabilities
-true
if the probabilities of class configurations are estimated,false
otherwise
-
TestDatasetMethod
Constructor that receives aDatasetReader
for the test dataset, whether the dataset should be shuffled, a seed for shuffling and whether the probabilities of each class configuration should be estimated during the testing.- Parameters:
testDatasetReader
-DatasetReader
for the test datasetestimateProbabilities
-true
if the probabilities of class configurations are estimated,false
otherwise
-
-
Method Details
-
evaluate
public Map<String,Double> evaluate(MultiCTBNC<?, ?> model) throws UnreadDatasetException, ErroneousValueExceptionDescription copied from class:ValidationMethod
Evaluates the performance of the specified model and returns the results.- Specified by:
evaluate
in classValidationMethod
- Parameters:
model
- model to evaluate- Returns:
- results saved in a
Map
. - Throws:
UnreadDatasetException
- if there was an error while reading a datasetErroneousValueException
- if a provided parameter is erroneous for the requested task
-
evaluate
public Map<String,Double> evaluate(MultiCTBNC<?, ?> model, double preprocessingExecutionTime) throws UnreadDatasetException, ErroneousValueExceptionDescription copied from class:ValidationMethod
Evaluates the performance of the specified model and returns the results. This method receives the execution time of previous tasks so it is add up to the total mean learning time.- Specified by:
evaluate
in classValidationMethod
- Parameters:
model
- model to evaluatepreprocessingExecutionTime
- execution time of previous tasks- Returns:
- results saved in a
Map
. - Throws:
UnreadDatasetException
- if there was an error while reading a datasetErroneousValueException
- if a provided parameter is erroneous for the requested task
-