Package com.bayesserver.optimization
Class DesignVariable
- java.lang.Object
-
- com.bayesserver.optimization.DesignVariable
-
public final class DesignVariable extends Object
Specifies on or more inputs to the optimization algorithm.
-
-
Constructor Summary
Constructors Constructor Description DesignVariable(Variable variable, Double lowerBound, Double upperBound, boolean allowMissing)Initializes a new instance of thecom.bayesserver.optization.DesignVariableclass, automatically generating the necessary design states.DesignVariable(Variable variable, Double lowerBound, Double upperBound, boolean allowMissing, InterventionType interventionType)Initializes a new instance of theDesignVariableclass, automatically generating the necessary design states.DesignVariable(Variable variable, List<DesignState> designStates, boolean allowMissing)Initializes a new instance of theDesignVariableclass.DesignVariable(Variable variable, List<DesignState> designStates, DesignEvidenceKind evidenceKind, boolean allowMissing, InterventionType interventionType)Initializes a new instance of theDesignVariableclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAllowMissing()Determines whether the optimizer can consider missing values (evidence not set) on this variable.List<DesignState>getDesignStates()Gets the design states, one for each state in the variable.DesignEvidenceKindgetEvidenceKind()Determines whether the optimizer uses hard or soft/virtual evidence for this variable.InterventionTypegetInterventionType()Determines the evidence intervention type for this variable.VariablegetVariable()Gets the variable these options refer to.voidsetAllowMissing(boolean value)Determines whether the optimizer can consider missing values (evidence not set) on this variable.voidsetEvidenceKind(DesignEvidenceKind value)Determines whether the optimizer uses hard or soft/virtual evidence for this variable.voidsetInterventionType(InterventionType value)Determines the evidence intervention type for this variable.
-
-
-
Constructor Detail
-
DesignVariable
public DesignVariable(Variable variable, Double lowerBound, Double upperBound, boolean allowMissing)
Initializes a new instance of thecom.bayesserver.optization.DesignVariableclass, 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 theDesignVariableclass, 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 theDesignVariableclass.- 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 theDesignVariableclass.- 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.
-
-