Package ai.libs.jaicore.experiments
Class AlgorithmBenchmarker
- java.lang.Object
-
- ai.libs.jaicore.experiments.AlgorithmBenchmarker
-
- All Implemented Interfaces:
IExperimentSetEvaluator,org.api4.java.common.control.ILoggingCustomizable
public class AlgorithmBenchmarker extends java.lang.Object implements IExperimentSetEvaluator, org.api4.java.common.control.ILoggingCustomizable
-
-
Constructor Summary
Constructors Constructor Description AlgorithmBenchmarker(IExperimentDecoder<I,A> decoder, IExperimentRunController<?> controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPreRunHook(java.util.function.Consumer<org.api4.java.algorithm.IAlgorithm<?,?>> hook)voidevaluate(ExperimentDBEntry experimentEntry, IExperimentIntermediateResultProcessor processor)Method to compute a single point of the experiment setjava.util.function.Function<Experiment,org.api4.java.algorithm.Timeout>getExperimentSpecificTimeout()java.lang.StringgetLoggerName()org.api4.java.algorithm.TimeoutgetTimeout()voidsetExperimentSpecificTimeout(java.util.function.Function<Experiment,org.api4.java.algorithm.Timeout> experimentSpecificTimeout)voidsetLoggerName(java.lang.String name)voidsetTimeout(org.api4.java.algorithm.Timeout timeout)
-
-
-
Constructor Detail
-
AlgorithmBenchmarker
public AlgorithmBenchmarker(IExperimentDecoder<I,A> decoder, IExperimentRunController<?> controller)
-
-
Method Detail
-
evaluate
public final void evaluate(ExperimentDBEntry experimentEntry, IExperimentIntermediateResultProcessor processor) throws ExperimentEvaluationFailedException, java.lang.InterruptedException
Description copied from interface:IExperimentSetEvaluatorMethod to compute a single point of the experiment set- Specified by:
evaluatein interfaceIExperimentSetEvaluator- Parameters:
experimentEntry- The point of the experiment setprocessor- A handle to return intermediate results to the experiment runner routine- Throws:
ExperimentEvaluationFailedExceptionjava.lang.InterruptedException
-
getLoggerName
public java.lang.String getLoggerName()
- Specified by:
getLoggerNamein interfaceorg.api4.java.common.control.ILoggingCustomizable
-
setLoggerName
public void setLoggerName(java.lang.String name)
- Specified by:
setLoggerNamein interfaceorg.api4.java.common.control.ILoggingCustomizable
-
getTimeout
public org.api4.java.algorithm.Timeout getTimeout()
-
setTimeout
public void setTimeout(org.api4.java.algorithm.Timeout timeout)
-
getExperimentSpecificTimeout
public java.util.function.Function<Experiment,org.api4.java.algorithm.Timeout> getExperimentSpecificTimeout()
-
setExperimentSpecificTimeout
public void setExperimentSpecificTimeout(java.util.function.Function<Experiment,org.api4.java.algorithm.Timeout> experimentSpecificTimeout)
-
addPreRunHook
public void addPreRunHook(java.util.function.Consumer<org.api4.java.algorithm.IAlgorithm<?,?>> hook)
-
-