15
atheist
3y

Currently writing code to write math.

What I'm saying is, I make nerds look good.

Comments
  • 2
    Why is this useful?
  • 5
    Programmatic demonstration of (multiple) derivations of a matrix inverse.

    Used in linear regression, various other stuff.
  • 2
  • 4
    I wrote the matrix class myself, is fairly simple/easier to understand than numpy, using pure python.

    My intention is basically to write an ML course that actually teaches how/why do the stuff, rather than just going "here's some complex algebra you don't need to understand".

    There are some bits where I'll probably have to just say "here's a thing that works", but that's probably just because I don't fully understand the thing.

    So many mathematical constructs have equivalent engineering techniques. I think I'd have found it useful, so that's what I'm trying to write.
  • 1
    Why is the matrix size always a square and hard coded ?
  • 1
    and is it writing latex ?
  • 1
    And what does a@b do ?
  • 1
    @AvatarOfKaine a@b is python 3's matrix multiplication operator

    It's square coz I'm lazy

    It's writing HTML I think, but I'm using sympy for the symbol/equation representation.
  • 2
    @atheist Wait. What do you mean “It’s square coz I’m lazy” lol ?
    Or were you perhaps referring to the Moore-Penrose inverse ?
  • 2
    The Matrix class is always square at the moment. I think it'd work if it isn't, but I haven't tried, hence lazy. And yes, I'm not worrying about the pseudo inverse right now, haven't really explained when a matrix has an inverse yet, still writing. I've explained the gauss Jordan elimination inverse method, so there's the simple case of "everything is 0" or "the rows are duplicated", but that's it. But it's also pretty cool, because they're emergent properties of the code, edge cases.
  • 2
    That is an excellent way to learn the basics (i did the same thing with python only).

    I have been working and presently writing my automatic differentiation library to match the beautiful semantics and easy-to-use functionality of PyTorch using NumPy. I am planning to make it public after a bit of clean-up soon. I can let you know if you are interested in contributing or referencing implementations from PyTorch to NumPy.
  • 1
    @amoux "basics", "degree in physics", potato potaato...
  • 0
    @amoux But cool! Sounds good. I've got a rough list of concepts, not really thought too far ahead at the moment.
  • 0
    I am studying Python and I’m getting frustrated at this thing…but I’d keep on anyways ..just frustrated but not giving up
  • 2
    MATLAB has joined the chat....
  • 1
    Try Coq. It's for creating mathematical proofs and theorems. The meta-mathematical language.
  • 1
    @cmarshall10450 😅 the point is to explain math to software engineers in a way they understand, so using python to demonstrate. Learning new niche language isn't ideal.
  • 0
    What do you think? It is running on my iPad! Currently, I named the package “ego” as I couldn’t think of a name that is; short, easy to type, and looked good to the eye. I haven’t shown anyone or made it publicly available yet. But what do you think of the name “ego”?

    This is just a fraction of the many functions I have implemented.
  • 0
    @amoux Here’s a link to a colab-notebook where I quickly trained a model on fashion-mnist dataset. I used pytorch’s torchvision to download and load the dataset. Everything else is implemented using “ego.”

    https://colab.research.google.com/d...
Add Comment