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
ConstructorsConstructorDescriptionTestDatasetMethod(DatasetReader testDatasetReader, boolean estimateProbabilities) Constructor that receives aDatasetReaderfor 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 twoDatasetReaderfor 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 twoDatasetReaderfor 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-DatasetReaderfor the training datasettestDatasetReader-DatasetReaderfor the test datasetestimateProbabilities-trueif the probabilities of class configurations are estimated,falseotherwise
-
TestDatasetMethod
Constructor that receives aDatasetReaderfor 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-DatasetReaderfor the test datasetestimateProbabilities-trueif the probabilities of class configurations are estimated,falseotherwise
-
-
Method Details
-
evaluate
public Map<String,Double> evaluate(MultiCTBNC<?, ?> model) throws UnreadDatasetException, ErroneousValueExceptionDescription copied from class:ValidationMethodEvaluates the performance of the specified model and returns the results.- Specified by:
evaluatein 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:ValidationMethodEvaluates 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:
evaluatein 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
-