Package com.bayesserver.optimization
Interface OptimizerOptions
-
- All Known Implementing Classes:
GeneticOptimizerOptions
,GeneticOptionsBase
,GeneticSimplificationOptions
public interface OptimizerOptions
Optimizer options that are common across all algorithms.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Cancellation
getCancellation()
Gets of sets the instance implementingCancellation
, used for cancellation.CausalEffectKind
getCausalEffectKind()
Gets the kind of causal effect to optimize.InferenceFactory
getInferenceFactory()
Creates one or more inference engines used by the optimization algorithm.Integer
getMaximumConcurrency()
Gets the maximum number of inference engines used during optimization.OptimizerProgress
getProgress()
Gets of sets the instance implementingOptimizerProgress
, used for progress notifications.List<QueryDistribution>
getQueryDistributions()
Determines which additional queries, if any, should be calculated by the inference engine when evaluating the fitness of a solution.List<QueryFunctionOutput>
getQueryFunctions()
Determines which additional functions, if any, should be calculated by the inference engine when evaluating the fitness of a solution.Boolean
getQueryLogLikelihood()
Determines whether the log-likelihood should be calculated by the inference engine when evaluating the fitness of a solution.Stop
getStopping()
Gets the instance implementingStop
used for early stopping.void
setCancellation(Cancellation value)
Gets of sets the instance implementingCancellation
, used for cancellation.void
setCausalEffectKind(CausalEffectKind value)
Sets the kind of causal effect to optimize.void
setInferenceFactory(InferenceFactory value)
Creates one or more inference engines used by the optimization algorithm.void
setProgress(OptimizerProgress value)
Gets of sets the instance implementingOptimizerProgress
, used for progress notifications.void
setQueryLogLikelihood(Boolean value)
Determines whether the log-likelihood should be calculated by the inference engine when evaluating the fitness of a solution.void
setStopping(Stop value)
Sets the instance implementingStop
used for early stopping.
-
-
-
Method Detail
-
getQueryDistributions
List<QueryDistribution> getQueryDistributions()
Determines which additional queries, if any, should be calculated by the inference engine when evaluating the fitness of a solution. For example, additional queries maybe referenced by function nodes.
-
getQueryFunctions
List<QueryFunctionOutput> getQueryFunctions()
Determines which additional functions, if any, should be calculated by the inference engine when evaluating the fitness of a solution. For example, functions that are referenced by a function node optimization target/objective.
-
getCausalEffectKind
CausalEffectKind getCausalEffectKind()
Gets the kind of causal effect to optimize. e.g. Total/Direct. Not all algorithms support direct effect calculations.
-
setCausalEffectKind
void setCausalEffectKind(CausalEffectKind value)
Sets the kind of causal effect to optimize. e.g. Total/Direct. Not all algorithms support direct effect calculations.
-
getQueryLogLikelihood
Boolean getQueryLogLikelihood()
Determines whether the log-likelihood should be calculated by the inference engine when evaluating the fitness of a solution. For example, the log-likelihood maybe referenced by function nodes.
-
setQueryLogLikelihood
void setQueryLogLikelihood(Boolean value)
Determines whether the log-likelihood should be calculated by the inference engine when evaluating the fitness of a solution. For example, the log-likelihood maybe referenced by function nodes.
-
getInferenceFactory
InferenceFactory getInferenceFactory()
Creates one or more inference engines used by the optimization algorithm.
-
setInferenceFactory
void setInferenceFactory(InferenceFactory value)
Creates one or more inference engines used by the optimization algorithm.
-
getProgress
OptimizerProgress getProgress()
Gets of sets the instance implementingOptimizerProgress
, used for progress notifications.
-
setProgress
void setProgress(OptimizerProgress value)
Gets of sets the instance implementingOptimizerProgress
, used for progress notifications.
-
getCancellation
Cancellation getCancellation()
Gets of sets the instance implementingCancellation
, used for cancellation.- See Also:
Cancellation
-
setCancellation
void setCancellation(Cancellation value)
Gets of sets the instance implementingCancellation
, used for cancellation.- See Also:
Cancellation
-
getMaximumConcurrency
Integer getMaximumConcurrency()
Gets the maximum number of inference engines used during optimization. During optimization, multiple inference engines may be used in parallel. However each inference engine has its own memory requirements for inference, and so this parameter allows the number to be limited, to avoid excessive memory consumption. The amount of memory used per inference engine, depends on theNetwork
and also the evidence.
-
getStopping
Stop getStopping()
Gets the instance implementingStop
used for early stopping. Stopping is different to cancellation, as stopping will still return an objective value from the optimization process, albeit having performed fewer iterations.- Returns:
- The instance used for stopping.
-
setStopping
void setStopping(Stop value)
Sets the instance implementingStop
used for early stopping. Stopping is different to cancellation, as stopping will still return an objective value from the optimization process, albeit having performed fewer iterations.- Parameters:
value
- The instance used for stopping.
-
-