DataType - The type of data this reports validation performance for.ObjectType - The type of object that is returned by the anytime learner that
performance can be computed for.public class AnytimeBatchLearnerValidationPerformanceReporter<DataType,ObjectType> extends AbstractIterativeAlgorithmListener
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_FORMAT
The default format for reporting performance is "Iteration %d. Train: %s. Validation: %s".
|
protected java.lang.String |
format
The format for the performance report, passed to String.format.
|
protected java.io.PrintStream |
out
The print stream to report performance to.
|
protected PerformanceEvaluator<? super ObjectType,? super DataType,?> |
performanceEvaluator
The performance evaluator.
|
protected DataType |
validationData
The validation dataset to use.
|
| Constructor and Description |
|---|
AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator,
DataType validationData)
Creates a new
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream using the default format. |
AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator,
DataType validationData,
java.io.PrintStream out)
Creates a new
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream using the default format. |
AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator,
DataType validationData,
java.io.PrintStream out,
java.lang.String format)
Creates a new
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream and format. |
AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator,
DataType validationData,
java.lang.String format)
Creates a new
AnytimeBatchLearnerValidationPerformanceReporter that
reports to System.out and the given format. |
| Modifier and Type | Method and Description |
|---|---|
PerformanceEvaluator<? super ObjectType,? super DataType,?> |
getPerformanceEvaluator()
Gets the performance evaluator.
|
DataType |
getValidationData()
Gets the validation dataset.
|
void |
setPerformanceEvaluator(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator)
Sets the performance evaluator.
|
void |
setValidationData(DataType validationData)
Sets the validation dataset.
|
void |
stepEnded(IterativeAlgorithm algorithm)
This method is called when the algorithm has ended a step of its
execution.
|
algorithmEnded, algorithmStarted, stepStartedclonepublic static final java.lang.String DEFAULT_FORMAT
protected PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator
protected DataType validationData
protected java.io.PrintStream out
protected java.lang.String format
public AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator, DataType validationData)
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream using the default format.performanceEvaluator - The performance evaluator. Produces the metrics.validationData - The validation dataset to use.public AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator, DataType validationData, java.io.PrintStream out)
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream using the default format.performanceEvaluator - The performance evaluator. Produces the metrics.validationData - The validation dataset to use.out - Print stream to report the status to.public AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator, DataType validationData, java.lang.String format)
AnytimeBatchLearnerValidationPerformanceReporter that
reports to System.out and the given format.performanceEvaluator - The performance evaluator. Produces the metrics.validationData - The validation dataset to use.format - Format string for the status messages, which passed to
String.format.public AnytimeBatchLearnerValidationPerformanceReporter(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator, DataType validationData, java.io.PrintStream out, java.lang.String format)
AnytimeBatchLearnerValidationPerformanceReporter that
reports to the given print stream and format.performanceEvaluator - The performance evaluator. Produces the metrics.validationData - The validation dataset to use.out - Print stream to report the status to.format - Format string for the status messages, which passed to
String.format.public void stepEnded(IterativeAlgorithm algorithm)
IterativeAlgorithmListenerstepEnded in interface IterativeAlgorithmListenerstepEnded in class AbstractIterativeAlgorithmListeneralgorithm - The algorithm that has ended another step of its execution.public PerformanceEvaluator<? super ObjectType,? super DataType,?> getPerformanceEvaluator()
public void setPerformanceEvaluator(PerformanceEvaluator<? super ObjectType,? super DataType,?> performanceEvaluator)
performanceEvaluator - The performance evaluator.public DataType getValidationData()
public void setValidationData(DataType validationData)
validationData - The validation dataset.