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.DesignVariable
class, automatically generating the necessary design states.DesignVariable(Variable variable, Double lowerBound, Double upperBound, boolean allowMissing, InterventionType interventionType)
Initializes a new instance of theDesignVariable
class, automatically generating the necessary design states.DesignVariable(Variable variable, List<DesignState> designStates, boolean allowMissing)
Initializes a new instance of theDesignVariable
class.DesignVariable(Variable variable, List<DesignState> designStates, DesignEvidenceKind evidenceKind, boolean allowMissing, InterventionType interventionType)
Initializes a new instance of theDesignVariable
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAllowMissing()
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.DesignEvidenceKind
getEvidenceKind()
Determines whether the optimizer uses hard or soft/virtual evidence for this variable.InterventionType
getInterventionType()
Determines the evidence intervention type for this variable.Variable
getVariable()
Gets the variable these options refer to.void
setAllowMissing(boolean value)
Determines whether the optimizer can consider missing values (evidence not set) on this variable.void
setEvidenceKind(DesignEvidenceKind value)
Determines whether the optimizer uses hard or soft/virtual evidence for this variable.void
setInterventionType(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.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 theDesignVariable
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 theDesignVariable
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 theDesignVariable
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.
-
-