Class DesignVariable


  • public final class DesignVariable
    extends Object
    Specifies on or more inputs to the optimization algorithm.
    • Constructor Detail

      • DesignVariable

        public DesignVariable​(Variable variable,
                              Double lowerBound,
                              Double upperBound,
                              boolean allowMissing)
        Initializes a new instance of the com.bayesserver.optization.DesignVariable class, automatically generating the necessary design states.
        Parameters:
        variable - The optimizer input variable.
        lowerBound - Optional lower bound for the variable value if continuous, or the variable states if discrete.
        upperBound - Optional upper bound for the variable value if continuous, or the variable states if discrete.
        allowMissing - Determines whether the algorithm is allowed to consider having no evidence set on this variable.
      • DesignVariable

        public DesignVariable​(Variable variable,
                              Double lowerBound,
                              Double upperBound,
                              boolean allowMissing,
                              InterventionType interventionType)
        Initializes a new instance of the DesignVariable class, automatically generating the necessary design states.
        Parameters:
        variable - The optimizer input variable.
        lowerBound - Optional lower bound for the variable value if continuous, or the variable states if discrete.
        upperBound - Optional upper bound for the variable value if continuous, or the variable states if discrete.
        allowMissing - Determines whether the algorithm is allowed to consider having no evidence set on this variable.
        interventionType - Determines whether the evidence should be an intervention or not.
      • DesignVariable

        public DesignVariable​(Variable variable,
                              List<DesignState> designStates,
                              boolean allowMissing)
        Initializes a new instance of the DesignVariable class.
        Parameters:
        variable - The optimizer input variable.
        designStates - Options for each variable state.
        allowMissing - Determines whether the algorithm is allowed to consider having no evidence set on this variable.
      • DesignVariable

        public DesignVariable​(Variable variable,
                              List<DesignState> designStates,
                              DesignEvidenceKind evidenceKind,
                              boolean allowMissing,
                              InterventionType interventionType)
        Initializes a new instance of the DesignVariable class.
        Parameters:
        variable - The optimizer input variable.
        designStates - Options for each variable state.
        evidenceKind - Determines whether to consider hard or soft evidence.
        allowMissing - Determines whether the algorithm is allowed to consider having no evidence set on this variable.
        interventionType - Determines whether the evidence should be an intervention or not.
    • Method Detail

      • getEvidenceKind

        public DesignEvidenceKind getEvidenceKind()
        Determines whether the optimizer uses hard or soft/virtual evidence for this variable.
      • setEvidenceKind

        public void setEvidenceKind​(DesignEvidenceKind value)
        Determines whether the optimizer uses hard or soft/virtual evidence for this variable.
      • getVariable

        public Variable getVariable()
        Gets the variable these options refer to.
      • getInterventionType

        public InterventionType getInterventionType()
        Determines the evidence intervention type for this variable.
      • setInterventionType

        public void setInterventionType​(InterventionType value)
        Determines the evidence intervention type for this variable.
      • getDesignStates

        public List<DesignState> getDesignStates()
        Gets the design states, one for each state in the variable. Note that continuous and function variables have a single state.
      • getAllowMissing

        public boolean getAllowMissing()
        Determines whether the optimizer can consider missing values (evidence not set) on this variable.
      • setAllowMissing

        public void setAllowMissing​(boolean value)
        Determines whether the optimizer can consider missing values (evidence not set) on this variable.