andrey.data.CausePair#
- class andrey.data.CausePair(data, graph, feature_names, description, env=None, targets=None, conditions=None, name='', weight=0.0, cause=(), effect=())[source]#
One pair of the Tübingen collection: a
RealDatasetand what the collection records.data,graph,feature_names, anddescriptionare those ofRealDataset;descriptionis the pair’s own description file, which gives its variables, units, source, and the reason for its reference direction.env,targets, andconditionsareNone.- weight#
The collection’s weight for the pair. The pairs from one source share weights that sum to 1, so a weighted average over pairs does not count a source once per pair;
0marks a pair the collection leaves out of such averages. Use it as the weight of the pair’s correct-or-not outcome.- Type:
- cause, effect
The columns of the cause and of the effect, by name. A univariate pair has one each, named
"x"and"y"after the first and the second variable of its files, in the order of the file: the cause is"x"in some pairs and"y"in others. A multivariate pair names its columnsx1, x2, ...andy1, y2, ....
- property multivariate: bool#
Whether the cause or the effect has more than one column.
The collection states only that the cause block acts on the effect block, so
graphof a multivariate pair has an arc from each cause column to each effect column and says nothing about the columns inside a block. Methods that decide the direction between two columns read the other pairs.