Code Monkey home page Code Monkey logo

systemofequations's Introduction

System of Equations

System of Equations Logo

A step by step explanation of how to solve for a system of equations using jupyter notebooks and python scripts.

The Jupyter notebooks walks thru a brute force procedural method for solving a system of equations with pure Python. Why wouldn’t we just use numpy? Great question. This work is about creating tools that add efficiency AND clarity. I love numpy, pandas, sklearn, and all the great tools that the python data science community brings to us, but I have learned that the better I understand the “principles” of a thing, the better I know how to apply it. Plus, tomorrow's machine learning tools will be developed by those that understand the "principles" of the math and coding of today’s tools.

Getting started

  1. DevelopmentNotebook.ipynb contains the brute force code used to illustrate the methods. DevelopmentNotebook.py is a python script version of DevelopmentNotebook.ipynb for those that do not use Jupyter notebooks.
  2. ODFDevNB.ipynb contains similar code to DevelopmentNotebook.ipynb but prints output in LibreOffice Math format to automate the illustrations of the matrix math. It also had a corresponding .py file.
  3. SystemOfEquationsStepByStep.ipynb is the programming used to create an explanatory output of the steps, because I was TOO LAZY to have done all of the explanation work by hand! It has a corresponding .py file.
  4. SystemOfEquations.ipynb is a Jupyter notebook that walks you through the inversion programming steps. There is a corresponding .py version.
  5. LinearAlgebraPurePython.py is a module file to be imported and have it's functions called in basic linear algebra work.
  6. LinearAlgebraPractice.py is a simple python script that imports LinearAlgebraPurePython.py and uses it's functions.
  7. ShortImplementation.py is an attempt to make the shortest piece of python code possible to invert a matrix with the methods explained. I don't recommend using it. The shortest code is RARELY the best code. I'm a fan of clarity and maintainability.

Deploying / Publishing

I would appreciate it, as you share your work leveraged from this set of scripts, if you would please keep a referral back to my github repo. Thanks! I'd do the same for you. :-)

Contributing

I am open to share the development and improvements of this with others, but it has been solo up until now. Let me know if you'd like to contribute.

Links

This work came from My GitHub Repo originally.

Licensing

"The code in this project is licensed under MIT license."

systemofequations's People

Contributors

thomives avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

systemofequations's Issues

How to solve this system of equations as a neural network trains and predict?

I have some code:

[
//perceptron

'r1=b+(m1*x11)+(m2*x12)',
'r2=b+(m1*x21)+(m2*x22)',
'r3=b+(m1*x31)+(m2*x32)',

//entrenamiento

'r1=0',
'x11=0',
'x12=0',

'r2=0',
'x21=1',
'x22=0',

'r3=0',
'x31=0',
'x32=1',

//soluciones

'r4=b+(m1*x41)+(m2*x42)',
'r5=b+(m1*x51)+(m2*x52)',
'r6=b+(m1*x61)+(m2*x62)',
'r7=b+(m1*x71)+(m2*x72)',

'x41=0',
'x42=0',

'x51=1',
'x52=0',

'x61=0',
'x62=1',

'x71=1',
'x72=1',

]

And its throwing this:

image

Im using 5 libraries:

<script src="https://cdn.jsdelivr.net/npm/nerdamer@latest/nerdamer.core.js"></script> <script src="https://cdn.jsdelivr.net/npm/nerdamer@latest/Algebra.js"></script> <script src="https://cdn.jsdelivr.net/npm/nerdamer@latest/Calculus.js"></script> <script src="https://cdn.jsdelivr.net/npm/nerdamer@latest/Solve.js"></script> <script src="https://cdn.jsdelivr.net/npm/[email protected]/index.min.js"></script>

And I dont know why this neural network cant configure and predict the values. There is any help? Thanks anyway.

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.