-
Notifications
You must be signed in to change notification settings - Fork 3
Design ideas
sylvainbonnot edited this page Feb 17, 2022
·
5 revisions
Let's consider a simple dag:
In the dag above, prediction is a coparent of truth, because they share the same child confusion_count
subdag = sdag[['truth', 'prediction', 'confusion_value'],:]
subdag.dot_digraph()This code gives the expected result:
If in the above, prediction is missing, the subdag generated is the same (i.e the missing coparent should be added, at least by default) This is already the case.
subdag = sdag[['truth', 'confusion_value'],:]
subdag.dot_digraph()For example we consider
subdag = sdag[['truth', 'prediction'],:]
subdag.dot_digraph()That means that confusion_value is now absent.
def f(a,b):
return a+b
def g(b,c):
return b*c
def h(f,g):
return f-g
mydag = DAG([f,g,h])
smydag = mydag[['a','b','c'],:]
smydag.dot_digraph()This produces the wrong result:

Why is that? Because of the following:
ins | descendants(ins)is not the same as:
ins | descendants(ins) | descendants(ins | descendants(ins))In our example: ins=['a','b','c']