aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
gum::Counterfactual< GUM_ELEMENT > Class Template Reference

Computes a counterfactual distribution by building a twin model, then evaluating a causal effect on that twin and adapting the result back to the original model’s variables. More...

#include <counterfactual.h>

Collaboration diagram for gum::Counterfactual< GUM_ELEMENT >:

Public Types

using VarName = std::string
using ValName = std::string

Public Member Functions

 Counterfactual (const CausalModel< GUM_ELEMENT > &cm, const Set< std::string > &on, const Set< std::string > &whatif, const HashTable< VarName, ValName > &profile=HashTable< VarName, ValName >(), const HashTable< VarName, ValName > &values=HashTable< VarName, ValName >())
 Construct a counterfactual query using variable names.
 Counterfactual (const CausalModel< GUM_ELEMENT > &cm, const NodeSet &onIds, const NodeSet &whatifIds, const HashTable< NodeId, Idx > &profileIds=HashTable< NodeId, Idx >(), const HashTable< NodeId, Idx > &valuesIds=HashTable< NodeId, Idx >())
 Construct a counterfactual query using IDs (nodes/value IDs).
void run ()
 Rebuild the internal CausalImpact (ctor already calls this).
const CausalModel< GUM_ELEMENT > & originalModel () const
const CausalModel< GUM_ELEMENT > & twinModel () const
const CausalImpact< GUM_ELEMENT > & impact () const
 Symbolic result produced on the twin model.
const Tensor< GUM_ELEMENT > & value () const
 Numeric result adapted to the original model’s variables.
const Set< std::string > & on () const
const Set< std::string > & whatif () const
const HashTable< VarName, ValName > & profile () const
const HashTable< VarName, ValName > & values () const
std::string toString () const

Static Public Member Functions

static CausalModel< GUM_ELEMENT > counterFactualModel (const CausalModel< GUM_ELEMENT > &cm, const HashTable< VarName, ValName > &profile, const Set< std::string > &whatif)
static CausalModel< GUM_ELEMENT > counterFactualModel (const CausalModel< GUM_ELEMENT > &cm, const HashTable< NodeId, Idx > &profileIds, const NodeSet &whatifIds)

Private Member Functions

const CausalFormula< GUM_ELEMENT > & _ciResult () const

Static Private Member Functions

static Tensor< GUM_ELEMENT > _adaptToOriginalVariables_ (const Tensor< GUM_ELEMENT > &adj, const CausalModel< GUM_ELEMENT > &cm)
static Set< std::string > _idsToNames_ (const CausalModel< GUM_ELEMENT > &cm, const NodeSet &ids)
static HashTable< VarName, ValName_idAssignToNameAssign_ (const CausalModel< GUM_ELEMENT > &cm, const HashTable< NodeId, Idx > &idAssign)

Private Attributes

const CausalModel< GUM_ELEMENT > & _cm
Set< std::string > _on
Set< std::string > _whatif
HashTable< VarName, ValName_profile
HashTable< VarName, ValName_values
CausalModel< GUM_ELEMENT > _twin
Tensor< GUM_ELEMENT > _adaptedValue
std::unique_ptr< CausalImpact< GUM_ELEMENT > > _ci

Detailed Description

template<GUM_Numeric GUM_ELEMENT>
class gum::Counterfactual< GUM_ELEMENT >

Computes a counterfactual distribution by building a twin model, then evaluating a causal effect on that twin and adapting the result back to the original model’s variables.

High-level workflow:

  1. Build the twin causal model with ::counterFactualModel:
    • Start from the observational BN.
    • Identify idiosyncratic variables (parentless nodes) and remove any that are in whatif or latent.
    • Run inference on the original BN with the optional profile evidence and replace the priors of idiosyncratic variables in the twin by their posteriors from the original BN.
  2. On the twin model, build a CausalImpact for the query P(on | do(whatif), …) and evaluate it numerically.
  3. If values is provided, slice the numeric tensor using only the assignments present in the result (safe partial instantiation).
  4. Adapt the evaluated tensor back to the original model by rebuilding a tensor with the same variable names (and order) as produced by the twin evaluation, but bound to the original BN’s variables.

Constructors:

  • Names API: Counterfactual(cm, on, whatif, profile, values) where on and whatif are sets of variable names; profile and values are name→label assignments. profile is used as observational evidence when computing posteriors for the idiosyncratic roots; values gives the specific do-assignments when evaluating the effect and for optional numeric slicing.
  • IDs API: Counterfactual(cm, onIds, whatifIds, profileIds, valuesIds) same semantics, using node/value identifiers.

Results:

  • value() returns the numeric tensor adapted to the original model’s variables (order mirrors the twin evaluation’s variable sequence).
  • getResult() exposes the symbolic CausalFormula produced on the twin model (variable names match those of the original BN).

Notes:

  • profile and values can be empty.
  • values is not required to build the formula; it is used for the twin evaluation and optional numeric slicing.
  • Exceptions from evidence insertion, inference, CPT replacement and tensor building may propagate (e.g., unknown variable/label names, inconsistent domains).
Template Parameters
GUM_ELEMENTNumeric type used in potentials (e.g., double).

Definition at line 102 of file counterfactual.h.

Member Typedef Documentation

◆ ValName

template<GUM_Numeric GUM_ELEMENT>
using gum::Counterfactual< GUM_ELEMENT >::ValName = std::string

Definition at line 105 of file counterfactual.h.

◆ VarName

template<GUM_Numeric GUM_ELEMENT>
using gum::Counterfactual< GUM_ELEMENT >::VarName = std::string

Definition at line 104 of file counterfactual.h.

Constructor & Destructor Documentation

◆ Counterfactual() [1/2]

template<GUM_Numeric GUM_ELEMENT>
gum::Counterfactual< GUM_ELEMENT >::Counterfactual ( const CausalModel< GUM_ELEMENT > & cm,
const Set< std::string > & on,
const Set< std::string > & whatif,
const HashTable< VarName, ValName > & profile = HashTableVarNameValName >(),
const HashTable< VarName, ValName > & values = HashTableVarNameValName >() )

Construct a counterfactual query using variable names.

Builds a twin model from cm using profile as observational evidence to update idiosyncratic roots, then evaluates the causal effect P(on | do(whatif), …). If values is provided, the evaluated tensor is optionally sliced by these assignments (only for variables present in the result), and finally adapted to the original BN’s variables.

Parameters
cmSource causal model (provides the observational BN).
onSet of variable names to query in the effect.
whatifSet of variable names intervened by do(·).
profileName→label evidence used when computing posteriors in the original BN for idiosyncratic roots. May be empty.
valuesName→label assignments for the intervention values to use during numeric evaluation and optional slicing. May be empty.

Definition at line 53 of file counterfactual_tpl.h.

57 :
60 run();
61 }
Computes a counterfactual distribution by building a twin model, then evaluating a causal effect on t...
CausalModel< GUM_ELEMENT > _twin
const Set< std::string > & on() const
std::unique_ptr< CausalImpact< GUM_ELEMENT > > _ci
HashTable< VarName, ValName > _profile
HashTable< VarName, ValName > _values
Tensor< GUM_ELEMENT > _adaptedValue
const Set< std::string > & whatif() const
static CausalModel< GUM_ELEMENT > counterFactualModel(const CausalModel< GUM_ELEMENT > &cm, const HashTable< VarName, ValName > &profile, const Set< std::string > &whatif)
const HashTable< VarName, ValName > & values() const
const CausalModel< GUM_ELEMENT > & _cm
const HashTable< VarName, ValName > & profile() const
Set< std::string > _whatif
void run()
Rebuild the internal CausalImpact (ctor already calls this).
Set< std::string > _on

References _adaptedValue, _ci, _cm, _on, _profile, _twin, _values, _whatif, counterFactualModel(), on(), profile(), run(), values(), and whatif().

Referenced by Counterfactual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Counterfactual() [2/2]

template<GUM_Numeric GUM_ELEMENT>
gum::Counterfactual< GUM_ELEMENT >::Counterfactual ( const CausalModel< GUM_ELEMENT > & cm,
const NodeSet & onIds,
const NodeSet & whatifIds,
const HashTable< NodeId, Idx > & profileIds = HashTableNodeIdIdx >(),
const HashTable< NodeId, Idx > & valuesIds = HashTableNodeIdIdx >() )

Construct a counterfactual query using IDs (nodes/value IDs).

Same semantics as the names-based constructor, but using node identifiers and value identifiers directly.

Parameters
cmSource causal model.
onIdsNode IDs to query in the effect.
whatifIdsNode IDs to intervene on via do(·).
profileIdsNodeId→ValueId evidence for posterior update of idiosyncratic roots. May be empty.
valuesIdsNodeId→ValueId assignments for the intervention values during numeric evaluation and optional slicing. May be empty.

Definition at line 64 of file counterfactual_tpl.h.

68 :
static HashTable< VarName, ValName > _idAssignToNameAssign_(const CausalModel< GUM_ELEMENT > &cm, const HashTable< NodeId, Idx > &idAssign)
static Set< std::string > _idsToNames_(const CausalModel< GUM_ELEMENT > &cm, const NodeSet &ids)
Counterfactual(const CausalModel< GUM_ELEMENT > &cm, const Set< std::string > &on, const Set< std::string > &whatif, const HashTable< VarName, ValName > &profile=HashTable< VarName, ValName >(), const HashTable< VarName, ValName > &values=HashTable< VarName, ValName >())
Construct a counterfactual query using variable names.

References Counterfactual(), _idAssignToNameAssign_(), and _idsToNames_().

Here is the call graph for this function:

Member Function Documentation

◆ _adaptToOriginalVariables_()

template<GUM_Numeric GUM_ELEMENT>
Tensor< GUM_ELEMENT > gum::Counterfactual< GUM_ELEMENT >::_adaptToOriginalVariables_ ( const Tensor< GUM_ELEMENT > & adj,
const CausalModel< GUM_ELEMENT > & cm )
staticprivate

Definition at line 189 of file counterfactual_tpl.h.

191 {
193 const auto& bn = cm.observationalBN();
194
195 // keep adj variable order
196 for (const auto& v: adj.variablesSequence()) {
197 res.add(bn.variableFromName(v->name()));
198 }
199 res.fillWith(adj);
200 return res;
201 }

References gum::MultiDimDecorator< GUM_SCALAR >::add(), gum::Tensor< GUM_SCALAR >::fillWith(), gum::CausalModel< GUM_SCALAR >::observationalBN(), and gum::MultiDimDecorator< GUM_SCALAR >::variablesSequence().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _ciResult()

template<GUM_Numeric GUM_ELEMENT>
const CausalFormula< GUM_ELEMENT > & gum::Counterfactual< GUM_ELEMENT >::_ciResult ( ) const
private

Definition at line 206 of file counterfactual_tpl.h.

206 {
207 return _ci->getResult(); // public accessor in CausalImpact
208 }

References _ci.

Referenced by toString().

Here is the caller graph for this function:

◆ _idAssignToNameAssign_()

template<GUM_Numeric GUM_ELEMENT>
HashTable< typename Counterfactual< GUM_ELEMENT >::VarName, typename Counterfactual< GUM_ELEMENT >::ValName > gum::Counterfactual< GUM_ELEMENT >::_idAssignToNameAssign_ ( const CausalModel< GUM_ELEMENT > & cm,
const HashTable< NodeId, Idx > & idAssign )
staticprivate

Definition at line 289 of file counterfactual_tpl.h.

291 {
293 const auto& bn = cm.observationalBN();
294 for (const auto& kv: idAssign) {
295 const NodeId nid = kv.first;
296 const Idx valId = kv.second;
297 const auto& var = bn.variable(nid); // reference by id
298 out.insert(var.name(), var.label(valId));
299 }
300 return out;
301 }

References gum::HashTable< Key, Val >::insert(), and gum::CausalModel< GUM_SCALAR >::observationalBN().

Referenced by Counterfactual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _idsToNames_()

template<GUM_Numeric GUM_ELEMENT>
Set< std::string > gum::Counterfactual< GUM_ELEMENT >::_idsToNames_ ( const CausalModel< GUM_ELEMENT > & cm,
const NodeSet & ids )
staticprivate

Definition at line 275 of file counterfactual_tpl.h.

276 {
278 const auto& bn = cm.observationalBN();
279 for (auto nid: ids) {
280 const auto& var = bn.variable(nid); // reference by id
281 out.insert(var.name());
282 }
283 return out;
284 }

References gum::Set< Key >::insert(), and gum::CausalModel< GUM_SCALAR >::observationalBN().

Referenced by Counterfactual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ counterFactualModel() [1/2]

template<GUM_Numeric GUM_ELEMENT>
CausalModel< GUM_ELEMENT > gum::Counterfactual< GUM_ELEMENT >::counterFactualModel ( const CausalModel< GUM_ELEMENT > & cm,
const HashTable< NodeId, Idx > & profileIds,
const NodeSet & whatifIds )
static

Definition at line 127 of file counterfactual_tpl.h.

129 {
130 const auto& origBN = cm.observationalBN();
131 // 1) idiosyncratic = parentless \ (whatif ∪ latent)
133 for (auto nid: origBN.nodes()) {
134 if (origBN.parents(nid).size() == 0) { idiosyncratic.insert(nid); }
135 }
136 for (auto id: whatifIds) {
137 idiosyncratic.erase(id);
138 }
139 for (auto id: cm.latentVariablesIds()) {
140 idiosyncratic.erase(id);
141 }
142
143 // 2) posterior(idiosyncratic | profile) in ORIGINAL BN
145 {
147 if (!profileIds.empty()) {
148 for (const auto& kv: profileIds) {
149 const NodeId nid = kv.first;
150 const Idx valId = kv.second;
151 ie.addEvidence(nid, valId);
152 }
153 }
154 ie.makeInference();
155 auto& twinBN = twincm.observationalBN();
156 for (auto f: idiosyncratic) {
157 const auto& name = origBN.variable(f).name();
158 const NodeId twinId = twinBN.idFromName(name);
159 const Tensor< GUM_ELEMENT > post = ie.posterior(f);
160 twinBN.cpt(twinId).fillWith(post);
161 }
162 }
163 return twincm;
164 }

References gum::GraphicalModelInference< GUM_SCALAR >::addEvidence(), gum::HashTable< Key, Val >::empty(), gum::Set< Key >::erase(), gum::Set< Key >::insert(), gum::CausalModel< GUM_SCALAR >::latentVariablesIds(), gum::GraphicalModelInference< GUM_SCALAR >::makeInference(), gum::CausalModel< GUM_SCALAR >::observationalBN(), and gum::JointTargetedInference< GUM_SCALAR >::posterior().

Here is the call graph for this function:

◆ counterFactualModel() [2/2]

template<GUM_Numeric GUM_ELEMENT>
CausalModel< GUM_ELEMENT > gum::Counterfactual< GUM_ELEMENT >::counterFactualModel ( const CausalModel< GUM_ELEMENT > & cm,
const HashTable< VarName, ValName > & profile,
const Set< std::string > & whatif )
static

Definition at line 78 of file counterfactual_tpl.h.

81 {
82 const auto& origBN = cm.observationalBN();
83 CausalModel< GUM_ELEMENT > twincm(origBN); // copy (serves as clone)
84
85 // 1) idiosyncratic = parentless \ (whatif ∪ latent)
87 for (const auto& w: whatif) {
88 whatifIds.insert(cm.idFromName(w));
89 }
91 for (auto nid: origBN.nodes()) {
92 if (origBN.parents(nid).size() == 0) { idiosyncratic.insert(nid); }
93 }
94 for (auto id: whatifIds) {
95 idiosyncratic.erase(id);
96 }
97 for (auto id: cm.latentVariablesIds()) {
98 idiosyncratic.erase(id);
99 }
100
101 // 2) posterior(idiosyncratic | profile) in ORIGINAL BN
103 if (!profile.empty()) {
104 for (const auto& kv: profile) {
105 const auto& varName = kv.first;
106 const auto& valName = kv.second;
107 const NodeId nid = cm.idFromName(varName);
108 const auto& var = origBN.variable(nid);
109 const Idx valId = var.index(valName);
110 ie.addEvidence(nid, valId);
111 }
112 }
113 ie.makeInference();
114 // 3) Replace priors in the twin with posteriors from the original
115 auto& twinBN = twincm.observationalBN();
116 for (auto f: idiosyncratic) {
117 const auto& name = origBN.variable(f).name();
118 auto twinId = twinBN.idFromName(name);
119 const Tensor< GUM_ELEMENT > post = ie.posterior(f);
120 twinBN.cpt(twinId).fillWith(post);
121 }
122 return twincm;
123 }

References gum::GraphicalModelInference< GUM_SCALAR >::addEvidence(), gum::Set< Key >::erase(), gum::CausalModel< GUM_SCALAR >::idFromName(), gum::Set< Key >::insert(), gum::CausalModel< GUM_SCALAR >::latentVariablesIds(), gum::GraphicalModelInference< GUM_SCALAR >::makeInference(), gum::CausalModel< GUM_SCALAR >::observationalBN(), gum::JointTargetedInference< GUM_SCALAR >::posterior(), profile(), and whatif().

Referenced by Counterfactual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ impact()

template<GUM_Numeric GUM_ELEMENT>
const CausalImpact< GUM_ELEMENT > & gum::Counterfactual< GUM_ELEMENT >::impact ( ) const

Symbolic result produced on the twin model.

Exposes the CausalImpact built over the twin model. Variable names follow those of the original BN.

Returns
const CausalImpact<GUM_ELEMENT>& The causal formula.

Definition at line 379 of file counterfactual_tpl.h.

379 {
380 return *_ci;
381 }

References _ci.

◆ on()

template<GUM_Numeric GUM_ELEMENT>
const Set< std::string > & gum::Counterfactual< GUM_ELEMENT >::on ( ) const

Definition at line 389 of file counterfactual_tpl.h.

389 {
390 return _on;
391 }

References _on.

Referenced by Counterfactual().

Here is the caller graph for this function:

◆ originalModel()

template<GUM_Numeric GUM_ELEMENT>
const CausalModel< GUM_ELEMENT > & gum::Counterfactual< GUM_ELEMENT >::originalModel ( ) const

Definition at line 369 of file counterfactual_tpl.h.

369 {
370 return _cm;
371 }

References _cm.

◆ profile()

template<GUM_Numeric GUM_ELEMENT>
const HashTable< typename Counterfactual< GUM_ELEMENT >::VarName, typename Counterfactual< GUM_ELEMENT >::ValName > & gum::Counterfactual< GUM_ELEMENT >::profile ( ) const

Definition at line 401 of file counterfactual_tpl.h.

401 {
402 return _profile;
403 }

References _profile.

Referenced by Counterfactual(), and counterFactualModel().

Here is the caller graph for this function:

◆ run()

template<GUM_Numeric GUM_ELEMENT>
void gum::Counterfactual< GUM_ELEMENT >::run ( )

Rebuild the internal CausalImpact (ctor already calls this).

Definition at line 169 of file counterfactual_tpl.h.

169 {
170 // Build symbolic effect on the twin
172
173 // Numeric evaluation on the twin
174 Tensor< GUM_ELEMENT > adj = _ci->eval();
175
176 // Slice by specified intervention values (partial instantiation, safe if some names are absent)
177 if (!_values.empty() && adj.nbrDim() > 0) {
178 auto I = makeInstantiationFromValues(adj, _values); // keeps only vars present in `adj`
179 if (I.nbrDim() > 0) adj = adj.extract(I);
180 }
181
182 // Adapt tensor to ORIGINAL model variables
184 }
static Tensor< GUM_ELEMENT > _adaptToOriginalVariables_(const Tensor< GUM_ELEMENT > &adj, const CausalModel< GUM_ELEMENT > &cm)
Instantiation makeInstantiationFromValues(const Tensor< GUM_SCALAR > &tensor, const HashTable< std::string, std::string > &values)
Creates an instance for a tensor based on a HashTable.

References _adaptedValue, _adaptToOriginalVariables_(), _ci, _cm, _on, _twin, _values, _whatif, and gum::makeInstantiationFromValues().

Referenced by Counterfactual().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

template<GUM_Numeric GUM_ELEMENT>
std::string gum::Counterfactual< GUM_ELEMENT >::toString ( ) const

Definition at line 213 of file counterfactual_tpl.h.

213 {
215 os << "[Counterfactual]\n";
216
217 os << " on = {";
218 {
219 bool first = true;
220 for (const auto& s: _on) {
221 if (!first) os << ", ";
222 os << s;
223 first = false;
224 }
225 }
226 os << "}\n whatif = {";
227 {
228 bool first = true;
229 for (const auto& s: _whatif) {
230 if (!first) os << ", ";
231 os << s;
232 first = false;
233 }
234 }
235 os << "}\n";
236
237 if (!_profile.empty()) {
238 os << " profile: ";
239 bool first = true;
240 for (const auto& [k, v]: _profile) {
241 if (!first) os << ", ";
242 os << k << "=" << v;
243 first = false;
244 }
245 os << "\n";
246 }
247
248 if (!_values.empty()) {
249 os << " values: ";
250 bool first = true;
251 for (const auto& [k, v]: _values) {
252 if (!first) os << ", ";
253 os << k << "=" << v;
254 first = false;
255 }
256 os << "\n";
257 }
258
259 os << " result (symbolic): ";
260 if (_ci && _ci->isIdentified()) os << _ciResult().toString() << "\n";
261 else os << "<unidentified>\n";
262
263 if (_adaptedValue.nbrDim() > 0) {
264 os << " value (adapted to original variables):\n";
265 os << _adaptedValue << "\n";
266 }
267
268 return os.str();
269 }
const CausalFormula< GUM_ELEMENT > & _ciResult() const
std::string toString() const

References _adaptedValue, _ci, _ciResult(), _on, _profile, _values, and _whatif.

Here is the call graph for this function:

◆ twinModel()

template<GUM_Numeric GUM_ELEMENT>
const CausalModel< GUM_ELEMENT > & gum::Counterfactual< GUM_ELEMENT >::twinModel ( ) const

Definition at line 374 of file counterfactual_tpl.h.

374 {
375 return _twin;
376 }

References _twin.

◆ value()

template<GUM_Numeric GUM_ELEMENT>
const Tensor< GUM_ELEMENT > & gum::Counterfactual< GUM_ELEMENT >::value ( ) const

Numeric result adapted to the original model’s variables.

The tensor’s variable sequence mirrors that of the evaluated effect on the twin, but each variable object belongs to the original BN (so downstream code may use original variable references).

Returns
const Tensor<GUM_ELEMENT>& The adapted numeric tensor. It may be empty (nbrDim()==0) if the effect is not identifiable or if evaluation failed.

Definition at line 384 of file counterfactual_tpl.h.

384 {
385 return _adaptedValue;
386 }

References _adaptedValue.

Referenced by gum::counterfactual().

Here is the caller graph for this function:

◆ values()

template<GUM_Numeric GUM_ELEMENT>
const HashTable< typename Counterfactual< GUM_ELEMENT >::VarName, typename Counterfactual< GUM_ELEMENT >::ValName > & gum::Counterfactual< GUM_ELEMENT >::values ( ) const

Definition at line 408 of file counterfactual_tpl.h.

408 {
409 return _values;
410 }

References _values.

Referenced by Counterfactual().

Here is the caller graph for this function:

◆ whatif()

template<GUM_Numeric GUM_ELEMENT>
const Set< std::string > & gum::Counterfactual< GUM_ELEMENT >::whatif ( ) const

Definition at line 394 of file counterfactual_tpl.h.

394 {
395 return _whatif;
396 }

References _whatif.

Referenced by Counterfactual(), and counterFactualModel().

Here is the caller graph for this function:

Member Data Documentation

◆ _adaptedValue

template<GUM_Numeric GUM_ELEMENT>
Tensor< GUM_ELEMENT > gum::Counterfactual< GUM_ELEMENT >::_adaptedValue
private

Definition at line 224 of file counterfactual.h.

Referenced by Counterfactual(), run(), toString(), and value().

◆ _ci

template<GUM_Numeric GUM_ELEMENT>
std::unique_ptr< CausalImpact< GUM_ELEMENT > > gum::Counterfactual< GUM_ELEMENT >::_ci
private

Definition at line 226 of file counterfactual.h.

Referenced by Counterfactual(), _ciResult(), impact(), run(), and toString().

◆ _cm

template<GUM_Numeric GUM_ELEMENT>
const CausalModel< GUM_ELEMENT >& gum::Counterfactual< GUM_ELEMENT >::_cm
private

Definition at line 217 of file counterfactual.h.

Referenced by Counterfactual(), originalModel(), and run().

◆ _on

template<GUM_Numeric GUM_ELEMENT>
Set< std::string > gum::Counterfactual< GUM_ELEMENT >::_on
private

Definition at line 218 of file counterfactual.h.

Referenced by Counterfactual(), on(), run(), and toString().

◆ _profile

template<GUM_Numeric GUM_ELEMENT>
HashTable< VarName, ValName > gum::Counterfactual< GUM_ELEMENT >::_profile
private

Definition at line 220 of file counterfactual.h.

Referenced by Counterfactual(), profile(), and toString().

◆ _twin

template<GUM_Numeric GUM_ELEMENT>
CausalModel< GUM_ELEMENT > gum::Counterfactual< GUM_ELEMENT >::_twin
private

Definition at line 223 of file counterfactual.h.

Referenced by Counterfactual(), run(), and twinModel().

◆ _values

template<GUM_Numeric GUM_ELEMENT>
HashTable< VarName, ValName > gum::Counterfactual< GUM_ELEMENT >::_values
private

Definition at line 221 of file counterfactual.h.

Referenced by Counterfactual(), run(), toString(), and values().

◆ _whatif

template<GUM_Numeric GUM_ELEMENT>
Set< std::string > gum::Counterfactual< GUM_ELEMENT >::_whatif
private

Definition at line 219 of file counterfactual.h.

Referenced by Counterfactual(), run(), toString(), and whatif().


The documentation for this class was generated from the following files: