Package com.bayesserver.causal
Class FrontDoorCriterion
- java.lang.Object
-
- com.bayesserver.causal.FrontDoorCriterion
-
- All Implemented Interfaces:
Identification,Validation
public final class FrontDoorCriterion extends Object implements Identification, Validation
Uses the 'Front-door Criterion' to identify any sets of valid front-door nodes, that if found can be used to estimate the causal effect using theFrontDoorInference.Although the estimation can also be performed using Bayes Server, this criterion can also be used to identify front-door node sets for use outside Bayes Server.
-
-
Constructor Summary
Constructors Constructor Description FrontDoorCriterion(Network network)Initializes a new instance of theFrontDoorCriterionclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkgetNetwork()The Bayesian network on which the identification is based.IdentificationOutputidentify(Evidence evidence, Distribution query, IdentificationOptions options)Determines how to quantify a cause-effect relationship (for a particular criterion), but does not perform the actual estimation.IdentificationOutputidentify(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, IdentificationOptions options)Determines how to quantify a cause-effect relationship (for a particular criterion), but does not perform the actual estimation.BackdoorCriterionOutputidentifyXZ(Evidence evidence, FrontDoorSet frontDoorNodes, BackdoorCriterionOptions options)Uses the 'Backdoor criterion' to identify any 'adjustment sets' between treatments (X) and front-door nodes (Z).BackdoorCriterionOutputidentifyXZ(List<CausalNode> treatments, FrontDoorSet frontDoorNodes, List<CausalNode> nonTreatmentEvidence, BackdoorCriterionOptions options)Uses the 'Backdoor criterion' to identify any 'adjustment sets' between treatments (X) and front-door nodes (Z).BackdoorCriterionOutputidentifyZY(FrontDoorSet frontDoorNodes, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, BackdoorCriterionOptions options)BackdoorCriterionOutputidentifyZY(Evidence evidence, FrontDoorSet frontDoorNodes, Distribution query, BackdoorCriterionOptions options)Uses the 'Backdoor criterion' to identify any 'adjustment sets' between front-door nodes (Z) and outcomes (Y).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.
-
-
-
Constructor Detail
-
FrontDoorCriterion
public FrontDoorCriterion(Network network)
Initializes a new instance of theFrontDoorCriterionclass.- Parameters:
network- The Bayesian network.
-
-
Method Detail
-
identifyXZ
public BackdoorCriterionOutput identifyXZ(Evidence evidence, FrontDoorSet frontDoorNodes, BackdoorCriterionOptions options)
Uses the 'Backdoor criterion' to identify any 'adjustment sets' between treatments (X) and front-door nodes (Z).- Parameters:
evidence- Evidence which contains both one or more interventions (treatments X), and optionally other standard (non-intervention) evidence (adjusted nodes)).frontDoorNodes- One or more front-door nodes (Z).options- Options for the Backdoor criterion.- Returns:
- A list of possibly empty adjustment sets. i
-
identifyXZ
public BackdoorCriterionOutput identifyXZ(List<CausalNode> treatments, FrontDoorSet frontDoorNodes, List<CausalNode> nonTreatmentEvidence, BackdoorCriterionOptions options)
Uses the 'Backdoor criterion' to identify any 'adjustment sets' between treatments (X) and front-door nodes (Z).- Parameters:
treatments- One or more interventions (treatments X).frontDoorNodes- One or more front-door nodes (Z).nonTreatmentEvidence- Any other evidence other than interventions.options- Options for the Backdoor criterion.- Returns:
- A list of possibly empty adjustment sets. i
-
identifyZY
public BackdoorCriterionOutput identifyZY(Evidence evidence, FrontDoorSet frontDoorNodes, Distribution query, BackdoorCriterionOptions options)
Uses the 'Backdoor criterion' to identify any 'adjustment sets' between front-door nodes (Z) and outcomes (Y).- Parameters:
evidence- Evidence which contains both one or more interventions (treatments X), and optionally other standard (non-intervention) evidence (adjusted nodes)).frontDoorNodes- One or more front-door nodes (Z).query- One or more outcomes (Y).options- Options for the Backdoor criterion.- Returns:
- A list of possibly empty adjustment sets.
-
identifyZY
public BackdoorCriterionOutput identifyZY(FrontDoorSet frontDoorNodes, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, BackdoorCriterionOptions options)
- Parameters:
frontDoorNodes- One or more front-door nodes (Z).outcomes- One or more outcomes (Y).nonTreatmentEvidence- Any other evidence other than interventions.options- Options for the Backdoor criterion.- Returns:
- A list of possibly empty adjustment sets.
-
identify
public IdentificationOutput identify(Evidence evidence, Distribution query, IdentificationOptions options)
Determines how to quantify a cause-effect relationship (for a particular criterion), but does not perform the actual estimation.- Specified by:
identifyin interfaceIdentification- 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), often denoted 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:
- Information on how to calculate the requested cause-effect relationship.
-
getNetwork
public Network getNetwork()
The Bayesian network on which the identification is based.- Specified by:
getNetworkin interfaceIdentification
-
isValid
public 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.- Specified by:
isValidin interfaceValidation- 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.
-
validate
public void validate(Evidence evidence, Distribution query, ValidationOptions options)
Tests whether adjustment inputs are valid, and throws an exception if not, with an error message.- Specified by:
validatein interfaceValidation- 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.
-
identify
public IdentificationOutput identify(List<CausalNode> treatments, List<CausalNode> outcomes, List<CausalNode> nonTreatmentEvidence, IdentificationOptions options)
Determines how to quantify a cause-effect relationship (for a particular criterion), but does not perform the actual estimation.- Specified by:
identifyin interfaceIdentification- Parameters:
treatments- One or more treatments/interventions (X).outcomes- One or more outcomes (effects), often denoted Y.nonTreatmentEvidence- Any other evidence other than interventions.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:
- Information on how to calculate the requested cause-effect relationship.
-
validate
public 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.- Specified by:
validatein interfaceValidation- 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
public 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.- Specified by:
isValidin interfaceValidation- 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.
-
-