Package com.bayesserver.causal
Interface Validation
-
- All Known Implementing Classes:
BackdoorCriterion,DisjunctiveCauseCriterion,FrontDoorCriterion
public interface ValidationMethods to test whether adjustment inputs are valid. For example, to test whether an adjustment set is valid for a Backdoor adjustment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisValid(Evidence evidence, Distribution query, ValidationOptions options)Tests whether adjustment inputs are valid, without raising an exception.booleanisValid(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, ValidationOptions options)Tests whether adjustment inputs are valid, without raising an exception.voidvalidate(Evidence evidence, Distribution query, ValidationOptions options)Tests whether adjustment inputs are valid, and throws an exception if not, with an error message.voidvalidate(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, ValidationOptions options)Tests whether adjustment inputs are valid, and throws an exception if not, with an error message.
-
-
-
Method Detail
-
validate
void validate(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, ValidationOptions options)
Tests whether adjustment inputs are valid, and throws an exception if not, with an error message.- Parameters:
treatments- One or more treatments/interventions (X).outcomes- One or more outcomes (effects), often denoted Y.nonTreatmentEvidence- Any non-treatment evidence.options- Other options that govern how the calculations are performed. Some options are common to all criterion, and some will have additional options specific to that criterion.
-
isValid
boolean isValid(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, ValidationOptions options)
Tests whether adjustment inputs are valid, without raising an exception. If invalid, you can also call {@link com.bayesserver.causal.Validation#validate(IList{CausalNode}, IList{CausalNode}, IList{CausalNode}, IValidationOptions)} 'Validate' to throw an exception which contains an error message.- Parameters:
treatments- One or more treatments/interventions (X).outcomes- One or more outcomes (effects), often denoted Y.nonTreatmentEvidence- Any non-treatment evidence.options- Other options that govern how the calculations are performed. Some options are common to all criterion, and some will have additional options specific to that criterion.- Returns:
trueif valid,falseotherwise.
-
validate
void validate(Evidence evidence, Distribution query, ValidationOptions options)
Tests whether adjustment inputs are valid, and throws an exception if not, with an error message.- Parameters:
evidence- Evidence which contains both one or more interventions (treatments X), and optionally other standard (non-intervention) evidence.query- One or more outcomes (effects) Y.options- Other options that govern how the calculations are performed. Some options are common to all criterion, and some will have additional options specific to that criterion.- Throws:
ValidationException
-
isValid
boolean isValid(Evidence evidence, Distribution query, ValidationOptions options)
Tests whether adjustment inputs are valid, without raising an exception. If invalid, you can also callcom.bayesserver.causal.Validation#validate(IEvidence, IDistribution, IValidationOptions)'Validate' to throw an exception which contains an error message.- Parameters:
evidence- Evidence which contains both one or more interventions (treatments X), and optionally other standard (non-intervention) evidence.query- One or more outcomes (effects) Y.options- Other options that govern how the calculations are performed. Some options are common to all criterion, and some will have additional options specific to that criterion.- Returns:
trueif valid,falseotherwise.
-
-