Draft

Cholesky Decomposition

Description
Loading description...
Linear Algebra
Mathematics
  • Please sign in or sign up to leave a comment.
  • user9644768 Avatar
    • fbartelt Avatar

      Yeah.. I'm having a lot of trouble trying to figure out how to do this properly. This is my first kata and I have never had this "reverse experience", it's actually becoming pretty hard to implement a simple kata haha. But anyways, I hope I can solve these issues quickly

  • Blind4Basics Avatar

    Matrices that are not positive-definite

    ... plz think about those who don't have a math training => you should define what that means (or at least provide a link to the definition?)

    • fbartelt Avatar

      I will add a link to it, for what I've seen there's no way to write latex equations in Codewars' markdown syntax, what is quite sad.

      And since you are here, I've searched a lot on how to forbid modules, and the only things I was able to find were discourses where you mentioned your kata forbidder. Would it be too much asking you to teach me how to do it?

    • user9644768 Avatar

      what I've seen there's no way to write latex equations in Codewars' markdown syntax

      Here's an example: https://www.codewars.com/kata/5ebae674014091001729a9d7 or you can read this thread: https://github.com/codewars/codewars.com/issues/1527

    • Blind4Basics Avatar

      about the module forbidder, I know it's not yet bulletproof (not even sure it's actually possible to make it so... :/ ). I'd need to work on it again (especially with 3.8 in the wild: I believe it won't work for this version). I'll give it a shot.

    • Blind4Basics Avatar

      Houston, we have a problem...

      You're using numpy in your test suite. If I use the module forbidder, I forbid the whole module, so can you rewrite all the tests without it?

    • fbartelt Avatar

      Oh I thought there would be a way to forbid only a module function. But I've just started rewriting every matrix manipulation functions without using sci/numpy.

      @XRFXLP thanks for letting me know, I never thought it would work like that. After I finish rewriting the testcases I will start writing some useful math in the description

    • Blind4Basics Avatar

      ok, poke at me here once you finished to rewrite the tests

  • user9644768 Avatar

    Which specific libaries are forbidden? (and you should mention this in description) Because I am not sure whether my solution is allowed.

    • fbartelt Avatar

      The idea was to block only linalg,cholesky, because the real idea here was to "teach" users how do algorithm works. If there are other libraries that are being blocked, I'm not aware of it (Actually the reload has a really bad blocking system only because I couldn't THE way to forbid modules)

  • Avanta Avatar

    This comment has been hidden.

    • fbartelt Avatar

      Oh, I actually didn't know this reload thing was possible. I was trying to find a way to disable some modules and found out that Blind4Basics has some kind of code to do that, but I was unable to find it. I will spend some time now thinking about how to correctly do this module forbidder

      About the random tests, it was actually working, the problem you were getting was because of diagonal dominance, so some eigenvalues were getting too close to 0. I already corrected it and now I'm revising it to make sure this doesn't happen anymore.

    • fbartelt Avatar

      Ok, it should work now! I had some problems while trying to republish, I hope the changes were actually commited. Could you try again to see if problems persist? I checked the new random tests with numpy.linalg.cholesky and after a lot of tries, I got no error.

      I was unable to find a better way to block this bypass, so I will leave it like this for now and start solving some katas that Blind4Basics contributed to so I can learn how to properly solve this issue

    • user9644768 Avatar

      @BabiRuiva The permission error logs are wrong, even when I try to import scipy.linalg.cholesky or just numpy.linalg logs shows that I am importing numpy.linalg.cholesky.

    • fbartelt Avatar

      Is it still doing that? I tried to reproduce this right now, but got the right log