Class ParameterLearningOptions

  • All Implemented Interfaces:
    Cloneable

    public final class ParameterLearningOptions
    extends Object
    implements Cloneable
    Options governing parameter learning.
    • Constructor Detail

      • ParameterLearningOptions

        public ParameterLearningOptions()
    • 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 Network and 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 Network and 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 true statistics 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 - When true statistics 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. False by 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. False by 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 when getMaximumConcurrency() is 1 and when not distributed.
      • setSeed

        public void setSeed​(Integer value)
        Sets the seed used to generate random numbers for initialization. Only valid when getMaximumConcurrency() is 1 and when not distributed.
      • 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 the getTolerance().
        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 the getTolerance().
        Parameters:
        value - Maximum iterations.
      • getStopping

        public Stop getStopping()
        Gets the instance implementing Stop used 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 implementing Stop used 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.
      • 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.