GithubHelp home page GithubHelp logo

Inconsistent return types about causal-learn HOT 5 OPEN

py-why avatar py-why commented on May 27, 2024
Inconsistent return types

from causal-learn.

Comments (5)

kunwuz avatar kunwuz commented on May 27, 2024

Yeah, I totally agree with you. This issue has been listed in our issue tracking doc and we are currently working on it. Let me share the doc with you offline : )

from causal-learn.

tofuwen avatar tofuwen commented on May 27, 2024

Yes, I totally agree.

The problem is: our codebase in not designed in a OOP manner. The algorithms should extend the same base class, and the base class should have a unifying API, i.e. .run(), which return a GeneralGraph.

The same thing also happens to Independence Test --- previously these are just functions and not organized well.

I plan to initiate some refactors in the near future.

Currently, I am pushing to adding more tests into our code bases to guarantee the code correctness first. Without good tests, it's very hard to guarantee the code correctness when doing some huge code refactor.

Let me know what you think and I am happy to discuss. :)

from causal-learn.

jdramsey avatar jdramsey commented on May 27, 2024

That seems very sensible to me. OOP is definitely a good solution to this problem.

from causal-learn.

jdramsey avatar jdramsey commented on May 27, 2024

Also, I agree that it makes a lot more sense to do refactoring when there are good tests. Even a few well-placed tests can save a lot of headache, but more tests are better.

from causal-learn.

tofuwen avatar tofuwen commented on May 27, 2024

Totally agree!! :) More tests, the better! (Learned this lesson in a hard way lol)

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.