Class ParameterLearningOptions
- java.lang.Object
-
- com.bayesserver.learning.parameters.ParameterLearningOptions
-
-
Constructor Summary
Constructors Constructor Description ParameterLearningOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetCalculateStatistics()Gets a value indicating whether to calculate summary statistics in an extra iteration at the end of learning.CancellationgetCancellation()Gets of sets the instance implementingCancellation, used for cancellation.ConvergenceMethodgetConvergenceMethod()Gets the method used to determine convergence of the learning algorithm.DecisionPostProcessingMethodgetDecisionPostProcessing()Gets the post processing method for decision nodes.InitializationOptionsgetInitialization()Options for initialization.IntegergetMaximumConcurrency()Gets the maximum number of inference engines used during learning.intgetMaximumIterations()Gets the maximum number of iterations that parameter learning will perform.booleangetMonitorLogLikelihood()Calculates the log likelihood at each iteration.PriorsgetPriors()Contains parameters used to avoid boundary conditions during learning.ParameterLearningProgressgetProgress()Gets of sets the instance implementingParameterLearningProgress, used for progress notifications.booleangetSaveHyperparameters()Gets a value indicating whether hyperparameters (e.g.IntegergetSeed()Gets the seed used to generate random numbers for initialization.StopgetStopping()Gets the instance implementingStopused for early stopping.TimeSeriesModegetTimeSeriesMode()Gets the mode in which time series distributions are learned.DoublegetTolerance()Gets the tolerance used to determine whether or not parameter learning has converged.doublegetToleranceOrDefault()If Tolerance is null, this returns the default tolerance for the given convergence method, otherwise Tolerance is returned.voidsetCalculateStatistics(boolean value)Sets a value indicating whether to calculate summary statistics in an extra iteration at the end of learning.voidsetCancellation(Cancellation value)Gets of sets the instance implementingCancellation, used for cancellation.voidsetConvergenceMethod(ConvergenceMethod value)Sets the method used to determine convergence of the learning algorithm.voidsetDecisionPostProcessing(DecisionPostProcessingMethod value)Sets the post processing method for decision nodes.voidsetMaximumConcurrency(Integer value)Sets the maximum number of inference engines used during learning.voidsetMaximumIterations(int value)Sets the maximum number of iterations that parameter learning will perform.voidsetMonitorLogLikelihood(boolean value)Calculates the log likelihood at each iteration.voidsetProgress(ParameterLearningProgress value)Gets of sets the instance implementingParameterLearningProgress, used for progress notifications.voidsetSaveHyperparameters(boolean value)Sets a value indicating whether hyperparameters (e.g.voidsetSeed(Integer value)Sets the seed used to generate random numbers for initialization.voidsetStopping(Stop value)Sets the instance implementingStopused for early stopping.voidsetTimeSeriesMode(TimeSeriesMode value)Sets the mode in which time series distributions are learned.voidsetTolerance(Double value)Sets the tolerance used to determine whether or not parameter learning has converged.
-
-
-
Method Detail
-
getMaximumConcurrency
public Integer getMaximumConcurrency()
Gets the maximum number of inference engines used during learning.During learning, 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 the
Networkand also the data.
-
setMaximumConcurrency
public void setMaximumConcurrency(Integer value)
Sets the maximum number of inference engines used during learning.During learning, 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 the
Networkand also the data.
-
getConvergenceMethod
public ConvergenceMethod getConvergenceMethod()
Gets the method used to determine convergence of the learning algorithm.
-
setConvergenceMethod
public void setConvergenceMethod(ConvergenceMethod value)
Sets the method used to determine convergence of the learning algorithm.
-
getCalculateStatistics
public boolean getCalculateStatistics()
Gets a value indicating whether to calculate summary statistics in an extra iteration at the end of learning.- Returns:
- When
truestatistics are calculated.
-
setCalculateStatistics
public void setCalculateStatistics(boolean value)
Sets a value indicating whether to calculate summary statistics in an extra iteration at the end of learning.- Parameters:
value- Whentruestatistics are calculated.
-
getSaveHyperparameters
public boolean getSaveHyperparameters()
Gets a value indicating whether hyperparameters (e.g. experience tables) should be saved to the network. Hyperparameters such as experience tables can be used for online learning (adaptation).
-
setSaveHyperparameters
public void setSaveHyperparameters(boolean value)
Sets a value indicating whether hyperparameters (e.g. experience tables) should be saved to the network. Hyperparameters such as experience tables can be used for online learning (adaptation).
-
getMonitorLogLikelihood
public boolean getMonitorLogLikelihood()
Calculates the log likelihood at each iteration.Falseby default, as it can be expensive to calculate. This property does not effect the output of statistics on completion of learning.
-
setMonitorLogLikelihood
public void setMonitorLogLikelihood(boolean value)
Calculates the log likelihood at each iteration.Falseby default, as it can be expensive to calculate. This property does not effect the output of statistics on completion of learning.
-
getPriors
public Priors getPriors()
Contains parameters used to avoid boundary conditions during learning.
-
getSeed
public Integer getSeed()
Gets the seed used to generate random numbers for initialization. Only valid whengetMaximumConcurrency()is 1 and when not distributed.
-
setSeed
public void setSeed(Integer value)
Sets the seed used to generate random numbers for initialization. Only valid whengetMaximumConcurrency()is 1 and when not distributed.
-
getInitialization
public InitializationOptions getInitialization()
Options for initialization. Note that aDistributionSpecificationcan override certain initialization values.
-
getDecisionPostProcessing
public DecisionPostProcessingMethod getDecisionPostProcessing()
Gets the post processing method for decision nodes.
-
setDecisionPostProcessing
public void setDecisionPostProcessing(DecisionPostProcessingMethod value)
Sets the post processing method for decision nodes.
-
getTimeSeriesMode
public TimeSeriesMode getTimeSeriesMode()
Gets the mode in which time series distributions are learned.
-
setTimeSeriesMode
public void setTimeSeriesMode(TimeSeriesMode value)
Sets the mode in which time series distributions are learned.
-
getMaximumIterations
public int getMaximumIterations()
Gets the maximum number of iterations that parameter learning will perform. The parameter learning algorithm can perform fewer iterations that this maximum, if convergence is detected using thegetTolerance().- Returns:
- Maximum iterations.
-
setMaximumIterations
public void setMaximumIterations(int value)
Sets the maximum number of iterations that parameter learning will perform. The parameter learning algorithm can perform fewer iterations that this maximum, if convergence is detected using thegetTolerance().- Parameters:
value- Maximum iterations.
-
getStopping
public Stop getStopping()
Gets the instance implementingStopused for early stopping. Stopping is different to cancellation, as stopping will still complete the learning process, albeit having performed fewer iterations.- Returns:
- The instance used for stopping.
-
setStopping
public void setStopping(Stop value)
Sets the instance implementingStopused for early stopping. Stopping is different to cancellation, as stopping will still complete the learning process, albeit having performed fewer iterations.- Parameters:
value- The instance used for stopping.
-
getCancellation
public Cancellation getCancellation()
Gets of sets the instance implementingCancellation, used for cancellation.- See Also:
Cancellation
-
setCancellation
public void setCancellation(Cancellation value)
Gets of sets the instance implementingCancellation, used for cancellation.- See Also:
Cancellation
-
getProgress
public ParameterLearningProgress getProgress()
Gets of sets the instance implementingParameterLearningProgress, used for progress notifications.- See Also:
ParameterLearningProgress
-
setProgress
public void setProgress(ParameterLearningProgress value)
Gets of sets the instance implementingParameterLearningProgress, used for progress notifications.- See Also:
ParameterLearningProgress
-
getToleranceOrDefault
public double getToleranceOrDefault()
If Tolerance is null, this returns the default tolerance for the given convergence method, otherwise Tolerance is returned.- Returns:
-
getTolerance
public Double getTolerance()
Gets the tolerance used to determine whether or not parameter learning has converged. This is a non negative number which indicates that parameter learning will only stop when the relative difference between parameters or log-likelihood between iterations is no greater than this value.When null, a default value is used which depends on the Convergence Method in use.
- Returns:
- The tolerance.
-
setTolerance
public void setTolerance(Double value)
Sets the tolerance used to determine whether or not parameter learning has converged. This is a non negative number which indicates that parameter learning will only stop when the relative difference between parameters or log-likelihood between iterations is no greater than this value.When null, a default value is used which depends on the Convergence Method in use.
- Parameters:
value- The tolerance.
-
-