GithubHelp home page GithubHelp logo

Comments (3)

kunwuz avatar kunwuz commented on June 24, 2024

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.

from causal-learn.

priamai avatar priamai commented on June 24, 2024

Hello,
that worked:
https://colab.research.google.com/drive/1BZ2idQWgr7Ed6d09fk9bYi4a5RoOiu3g?usp=sharing
is there a way to save it into a file?

from causal-learn.

priamai avatar priamai commented on June 24, 2024

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.

from causal-learn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.