Open priamai opened 11 months ago
Yea you are right, at least for these LiNGAM-based methods we could definitely visualize them in a similar way as follows:
from causallearn.search.FCMBased import lingam
model = lingam.ICALiNGAM()
model.fit(data)
from causallearn.search.FCMBased.lingam.utils import make_dot
make_dot(model.adjacency_matrix_, labels=labels)
We will include these usages into the doc, and preferably make the visualization way consistent with other methods. For ANM or PNL, the multivariate version could be a little bit more tricky, see e.g. https://proceedings.mlr.press/v177/uemura22a/uemura22a.pdf.
Hello, that worked: https://colab.research.google.com/drive/1BZ2idQWgr7Ed6d09fk9bYi4a5RoOiu3g?usp=sharing is there a way to save it into a file?
Quick solution
from causallearn.search.FCMBased.lingam.utils import make_dot
my_dot = make_dot(model.adjacency_matrix_,labels=df.columns.to_list())
my_dot.filename="test"
my_dot.name="test"
my_dot.render(format='png')
my_dot.save(filename="test.dot")
maybe add to the docs.
Hi there, I noticed that the FCM methods don't produce a Graph object.
Why they are not following the other approach like in Constrained based and in Score Based? Cheers.